diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-10-29 09:34:15 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-10-29 09:34:15 -0400 |
commit | dd17c8f72993f9461e9c19250e3f155d6d99df22 (patch) | |
tree | c33eedf0cf2862e9feeb796e94d49a2ccdce0149 /include/asm-generic | |
parent | 390dfd95c5df1ab3921dd388d11b2aee332c3f2c (diff) |
percpu: remove per_cpu__ prefix.
Now that the return from alloc_percpu is compatible with the address
of per-cpu vars, it makes sense to hand around the address of per-cpu
variables. To make this sane, we remove the per_cpu__ prefix we used
created to stop people accidentally using these vars directly.
Now we have sparse, we can use that (next patch).
tj: * Updated to convert stuff which were missed by or added after the
original patch.
* Kill per_cpu_var() macro.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/percpu.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 8087b90d4673..ca6f0491412b 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -50,11 +50,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
50 | * offset. | 50 | * offset. |
51 | */ | 51 | */ |
52 | #define per_cpu(var, cpu) \ | 52 | #define per_cpu(var, cpu) \ |
53 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), per_cpu_offset(cpu))) | 53 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) |
54 | #define __get_cpu_var(var) \ | 54 | #define __get_cpu_var(var) \ |
55 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), my_cpu_offset)) | 55 | (*SHIFT_PERCPU_PTR(&(var), my_cpu_offset)) |
56 | #define __raw_get_cpu_var(var) \ | 56 | #define __raw_get_cpu_var(var) \ |
57 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset)) | 57 | (*SHIFT_PERCPU_PTR(&(var), __my_cpu_offset)) |
58 | 58 | ||
59 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 59 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) |
60 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | 60 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
@@ -66,9 +66,9 @@ extern void setup_per_cpu_areas(void); | |||
66 | 66 | ||
67 | #else /* ! SMP */ | 67 | #else /* ! SMP */ |
68 | 68 | ||
69 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | 69 | #define per_cpu(var, cpu) (*((void)(cpu), &(var))) |
70 | #define __get_cpu_var(var) per_cpu_var(var) | 70 | #define __get_cpu_var(var) (var) |
71 | #define __raw_get_cpu_var(var) per_cpu_var(var) | 71 | #define __raw_get_cpu_var(var) (var) |
72 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | 72 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) |
73 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | 73 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) |
74 | 74 | ||