Move ID reading signatures to a better header

The functions to read the common user and kernel ID registers should be
in cpu.h rather than undefined.h as they are related to CPU details and
used by undefined instruction handlers.

Sponsored by:	Innovate UK
This commit is contained in:
Andrew Turner 2020-07-01 16:17:51 +00:00
parent d16a2e4784
commit eeada9221b
2 changed files with 4 additions and 4 deletions

View File

@ -171,6 +171,10 @@ void identify_cpu(void);
void install_cpu_errata(void);
void swi_vm(void *v);
/* Functions to read the sanitised view of the special registers */
bool extract_user_id_field(u_int, u_int, uint8_t *);
bool get_kernel_reg(u_int, uint64_t *);
#define CPU_AFFINITY(cpu) __cpu_affinity[(cpu)]
#define CPU_CURRENT_SOCKET \
(CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid))))

View File

@ -63,10 +63,6 @@ void *install_undef_handler(bool, undef_handler_t);
void remove_undef_handler(void *);
int undef_insn(u_int, struct trapframe *);
/* Functions to read the sanitised view of the special registers */
bool extract_user_id_field(u_int, u_int, uint8_t *);
bool get_kernel_reg(u_int, uint64_t *);
#endif /* _KERNEL */
#endif