From eeada9221b4f5a9a5e1ef2aeb374d6a8506ee068 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 1 Jul 2020 16:17:51 +0000 Subject: [PATCH] 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 --- sys/arm64/include/cpu.h | 4 ++++ sys/arm64/include/undefined.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index cd76385f10f5..7cd7461e528c 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -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)))) diff --git a/sys/arm64/include/undefined.h b/sys/arm64/include/undefined.h index f958aa445a7f..b13aa34cf47c 100644 --- a/sys/arm64/include/undefined.h +++ b/sys/arm64/include/undefined.h @@ -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