1 #ifndef __ARM_PERCPU_H__
2 #define __ARM_PERCPU_H__
3 
4 #ifndef __ASSEMBLY__
5 
6 #include <xen/types.h>
7 #include <asm/sysregs.h>
8 
9 extern char __per_cpu_start[], __per_cpu_data_end[];
10 extern unsigned long __per_cpu_offset[NR_CPUS];
11 void percpu_init_areas(void);
12 
13 #define per_cpu(var, cpu)  \
14     (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
15 #define this_cpu(var) \
16     (*RELOC_HIDE(&per_cpu__##var, READ_SYSREG(TPIDR_EL2)))
17 
18 #define per_cpu_ptr(var, cpu)  \
19     (*RELOC_HIDE(var, __per_cpu_offset[cpu]))
20 #define this_cpu_ptr(var) \
21     (*RELOC_HIDE(var, READ_SYSREG(TPIDR_EL2)))
22 
23 #endif
24 
25 #endif /* __ARM_PERCPU_H__ */
26 /*
27  * Local variables:
28  * mode: C
29  * c-file-style: "BSD"
30  * c-basic-offset: 4
31  * indent-tabs-mode: nil
32  * End:
33  */
34