diff options
Diffstat (limited to 'include/asm-generic/percpu.h')
| -rw-r--r-- | include/asm-generic/percpu.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index d17784ea37ff..0703aa75b5e8 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
| @@ -56,17 +56,17 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
| 56 | #define per_cpu(var, cpu) \ | 56 | #define per_cpu(var, cpu) \ |
| 57 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) | 57 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) |
| 58 | 58 | ||
| 59 | #ifndef __this_cpu_ptr | 59 | #ifndef raw_cpu_ptr |
| 60 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | 60 | #define raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
| 61 | #endif | 61 | #endif |
| 62 | #ifdef CONFIG_DEBUG_PREEMPT | 62 | #ifdef CONFIG_DEBUG_PREEMPT |
| 63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) |
| 64 | #else | 64 | #else |
| 65 | #define this_cpu_ptr(ptr) __this_cpu_ptr(ptr) | 65 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) |
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | #define __get_cpu_var(var) (*this_cpu_ptr(&(var))) | 68 | #define __get_cpu_var(var) (*this_cpu_ptr(&(var))) |
| 69 | #define __raw_get_cpu_var(var) (*__this_cpu_ptr(&(var))) | 69 | #define __raw_get_cpu_var(var) (*raw_cpu_ptr(&(var))) |
| 70 | 70 | ||
| 71 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA | 71 | #ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA |
| 72 | extern void setup_per_cpu_areas(void); | 72 | extern void setup_per_cpu_areas(void); |
| @@ -83,7 +83,7 @@ extern void setup_per_cpu_areas(void); | |||
| 83 | #define __get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) | 83 | #define __get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) |
| 84 | #define __raw_get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) | 84 | #define __raw_get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) |
| 85 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | 85 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) |
| 86 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | 86 | #define raw_cpu_ptr(ptr) this_cpu_ptr(ptr) |
| 87 | 87 | ||
| 88 | #endif /* SMP */ | 88 | #endif /* SMP */ |
| 89 | 89 | ||
| @@ -122,4 +122,7 @@ extern void setup_per_cpu_areas(void); | |||
| 122 | #define PER_CPU_DEF_ATTRIBUTES | 122 | #define PER_CPU_DEF_ATTRIBUTES |
| 123 | #endif | 123 | #endif |
| 124 | 124 | ||
| 125 | /* Keep until we have removed all uses of __this_cpu_ptr */ | ||
| 126 | #define __this_cpu_ptr raw_cpu_ptr | ||
| 127 | |||
| 125 | #endif /* _ASM_GENERIC_PERCPU_H_ */ | 128 | #endif /* _ASM_GENERIC_PERCPU_H_ */ |
