aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@intel.com>2012-05-11 03:35:27 -0400
committerTejun Heo <tj@kernel.org>2012-05-14 17:15:31 -0400
commitc6ae41e7d469f00d9c92a2b2887c7235d121c009 (patch)
treeb16d65641c1e99a622ab460aee9f5b13e1948a25 /arch/x86/kernel/process_64.c
parent19e8d69c543f8f62050099892b138e981db952cc (diff)
x86: replace percpu_xxx funcs with this_cpu_xxx
Since percpu_xxx() serial functions are duplicated with this_cpu_xxx(). Removing percpu_xxx() definition and replacing them by this_cpu_xxx() in code. There is no function change in this patch, just preparation for later percpu_xxx serial function removing. On x86 machine the this_cpu_xxx() serial functions are same as __this_cpu_xxx() without no unnecessary premmpt enable/disable. Thanks for Stephen Rothwell, he found and fixed a i386 build error in the patch. Also thanks for Andrew Morton, he kept updating the patchset in Linus' tree. Signed-off-by: Alex Shi <alex.shi@intel.com> Acked-by: Christoph Lameter <cl@gentwo.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 43d8b48b23e6..28e810255a0a 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -237,7 +237,7 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,
237 current->thread.usersp = new_sp; 237 current->thread.usersp = new_sp;
238 regs->ip = new_ip; 238 regs->ip = new_ip;
239 regs->sp = new_sp; 239 regs->sp = new_sp;
240 percpu_write(old_rsp, new_sp); 240 this_cpu_write(old_rsp, new_sp);
241 regs->cs = _cs; 241 regs->cs = _cs;
242 regs->ss = _ss; 242 regs->ss = _ss;
243 regs->flags = X86_EFLAGS_IF; 243 regs->flags = X86_EFLAGS_IF;
@@ -359,11 +359,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
359 /* 359 /*
360 * Switch the PDA and FPU contexts. 360 * Switch the PDA and FPU contexts.
361 */ 361 */
362 prev->usersp = percpu_read(old_rsp); 362 prev->usersp = this_cpu_read(old_rsp);
363 percpu_write(old_rsp, next->usersp); 363 this_cpu_write(old_rsp, next->usersp);
364 percpu_write(current_task, next_p); 364 this_cpu_write(current_task, next_p);
365 365
366 percpu_write(kernel_stack, 366 this_cpu_write(kernel_stack,
367 (unsigned long)task_stack_page(next_p) + 367 (unsigned long)task_stack_page(next_p) +
368 THREAD_SIZE - KERNEL_STACK_OFFSET); 368 THREAD_SIZE - KERNEL_STACK_OFFSET);
369 369