diff options
Diffstat (limited to 'sys/arm64/include/pcpu.h')
-rw-r--r-- | sys/arm64/include/pcpu.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arm64/include/pcpu.h b/sys/arm64/include/pcpu.h index b93f3b2e4816..8d60b4ef6356 100644 --- a/sys/arm64/include/pcpu.h +++ b/sys/arm64/include/pcpu.h @@ -48,8 +48,10 @@ struct debug_monitor_state; struct pmap *pc_curpmap; \ struct pmap *pc_curvmpmap; \ u_int pc_bcast_tlbi_workaround; \ - u_int pc_mpidr; /* stored MPIDR value */ \ - char __pad[201] + /* Store as two u_int values to preserve KBI */ \ + u_int pc_mpidr_low; /* lower MPIDR 32 bits */ \ + u_int pc_mpidr_high; /* upper MPIDR 32 bits */ \ + char __pad[197] #ifdef _KERNEL @@ -83,6 +85,9 @@ get_curthread(void) #define PCPU_PTR(member) (&pcpup->pc_ ## member) #define PCPU_SET(member,value) (pcpup->pc_ ## member = (value)) +#define PCPU_GET_MPIDR(pc) \ + ((((uint64_t)((pc)->pc_mpidr_high)) << 32) | ((pc)->pc_mpidr_low)) + #endif /* _KERNEL */ #endif /* !_MACHINE_PCPU_H_ */ |