diff options
Diffstat (limited to 'include/asm-generic/percpu.h')
-rw-r--r-- | include/asm-generic/percpu.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 08923b684768..ec643115bb56 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -60,9 +60,14 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
60 | #define __raw_get_cpu_var(var) \ | 60 | #define __raw_get_cpu_var(var) \ |
61 | (*SHIFT_PERCPU_PTR(&(var), __my_cpu_offset)) | 61 | (*SHIFT_PERCPU_PTR(&(var), __my_cpu_offset)) |
62 | 62 | ||
63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 63 | #ifndef __this_cpu_ptr |
64 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | 64 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
65 | 65 | #endif | |
66 | #ifdef CONFIG_DEBUG_PREEMPT | ||
67 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | ||
68 | #else | ||
69 | #define this_cpu_ptr(ptr) __this_cpu_ptr(ptr) | ||
70 | #endif | ||
66 | 71 | ||
67 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA | 72 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA |
68 | extern void setup_per_cpu_areas(void); | 73 | extern void setup_per_cpu_areas(void); |