1 #ifndef __XEN_PERCPU_H__
2 #define __XEN_PERCPU_H__
3 
4 #include <asm/percpu.h>
5 
6 /*
7  * Separate out the type, so (int[3], foo) works.
8  *
9  * The _##name concatenation is being used here to prevent 'name' from getting
10  * macro expanded, while still allowing a per-architecture symbol name prefix.
11  */
12 #define DEFINE_PER_CPU(type, name) __DEFINE_PER_CPU(type, _##name, )
13 #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \
14 	__DEFINE_PER_CPU(type, _##name, .read_mostly)
15 
16 /* Preferred on Xen. Also see arch-defined per_cpu(). */
17 #define this_cpu(var)    __get_cpu_var(var)
18 
19 #define this_cpu_ptr(ptr)    __get_cpu_ptr(ptr)
20 
21 #define get_per_cpu_var(var)  (per_cpu__##var)
22 
23 /* Linux compatibility. */
24 #define get_cpu_var(var) this_cpu(var)
25 #define put_cpu_var(var)
26 
27 #endif /* __XEN_PERCPU_H__ */
28