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 /arch/x86/include/asm/system.h | |
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 'arch/x86/include/asm/system.h')
-rw-r--r-- | arch/x86/include/asm/system.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index f08f97374892..de10c19d9558 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h | |||
@@ -31,7 +31,7 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, | |||
31 | "movl %P[task_canary](%[next]), %%ebx\n\t" \ | 31 | "movl %P[task_canary](%[next]), %%ebx\n\t" \ |
32 | "movl %%ebx, "__percpu_arg([stack_canary])"\n\t" | 32 | "movl %%ebx, "__percpu_arg([stack_canary])"\n\t" |
33 | #define __switch_canary_oparam \ | 33 | #define __switch_canary_oparam \ |
34 | , [stack_canary] "=m" (per_cpu_var(stack_canary.canary)) | 34 | , [stack_canary] "=m" (stack_canary.canary) |
35 | #define __switch_canary_iparam \ | 35 | #define __switch_canary_iparam \ |
36 | , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) | 36 | , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) |
37 | #else /* CC_STACKPROTECTOR */ | 37 | #else /* CC_STACKPROTECTOR */ |
@@ -113,7 +113,7 @@ do { \ | |||
113 | "movq %P[task_canary](%%rsi),%%r8\n\t" \ | 113 | "movq %P[task_canary](%%rsi),%%r8\n\t" \ |
114 | "movq %%r8,"__percpu_arg([gs_canary])"\n\t" | 114 | "movq %%r8,"__percpu_arg([gs_canary])"\n\t" |
115 | #define __switch_canary_oparam \ | 115 | #define __switch_canary_oparam \ |
116 | , [gs_canary] "=m" (per_cpu_var(irq_stack_union.stack_canary)) | 116 | , [gs_canary] "=m" (irq_stack_union.stack_canary) |
117 | #define __switch_canary_iparam \ | 117 | #define __switch_canary_iparam \ |
118 | , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) | 118 | , [task_canary] "i" (offsetof(struct task_struct, stack_canary)) |
119 | #else /* CC_STACKPROTECTOR */ | 119 | #else /* CC_STACKPROTECTOR */ |
@@ -134,7 +134,7 @@ do { \ | |||
134 | __switch_canary \ | 134 | __switch_canary \ |
135 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ | 135 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ |
136 | "movq %%rax,%%rdi\n\t" \ | 136 | "movq %%rax,%%rdi\n\t" \ |
137 | "testl %[_tif_fork],%P[ti_flags](%%r8)\n\t" \ | 137 | "testl %[_tif_fork],%P[ti_flags](%%r8)\n\t" \ |
138 | "jnz ret_from_fork\n\t" \ | 138 | "jnz ret_from_fork\n\t" \ |
139 | RESTORE_CONTEXT \ | 139 | RESTORE_CONTEXT \ |
140 | : "=a" (last) \ | 140 | : "=a" (last) \ |
@@ -144,7 +144,7 @@ do { \ | |||
144 | [ti_flags] "i" (offsetof(struct thread_info, flags)), \ | 144 | [ti_flags] "i" (offsetof(struct thread_info, flags)), \ |
145 | [_tif_fork] "i" (_TIF_FORK), \ | 145 | [_tif_fork] "i" (_TIF_FORK), \ |
146 | [thread_info] "i" (offsetof(struct task_struct, stack)), \ | 146 | [thread_info] "i" (offsetof(struct task_struct, stack)), \ |
147 | [current_task] "m" (per_cpu_var(current_task)) \ | 147 | [current_task] "m" (current_task) \ |
148 | __switch_canary_iparam \ | 148 | __switch_canary_iparam \ |
149 | : "memory", "cc" __EXTRA_CLOBBER) | 149 | : "memory", "cc" __EXTRA_CLOBBER) |
150 | #endif | 150 | #endif |