aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-18 10:38:58 -0500
committerTejun Heo <tj@kernel.org>2009-01-18 10:38:58 -0500
commitc6f5e0acd5d12ee23f701f15889872e67b47caa6 (patch)
treea4613618f06d7519f954745b893b4f572ecd39d9 /arch/x86/kernel/process_64.c
parentea9279066de44053d0c20ea855bc9f4706652d84 (diff)
x86-64: Move current task from PDA to per-cpu and consolidate with 32-bit.
Signed-off-by: Brian Gerst <brgerst@gmail.com> 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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 416fb9282f4f..e00c31a4b3c0 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -57,6 +57,9 @@
57 57
58asmlinkage extern void ret_from_fork(void); 58asmlinkage extern void ret_from_fork(void);
59 59
60DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
61EXPORT_PER_CPU_SYMBOL(current_task);
62
60unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; 63unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
61 64
62static ATOMIC_NOTIFIER_HEAD(idle_notifier); 65static ATOMIC_NOTIFIER_HEAD(idle_notifier);
@@ -615,7 +618,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
615 */ 618 */
616 prev->usersp = read_pda(oldrsp); 619 prev->usersp = read_pda(oldrsp);
617 write_pda(oldrsp, next->usersp); 620 write_pda(oldrsp, next->usersp);
618 write_pda(pcurrent, next_p); 621 percpu_write(current_task, next_p);
619 622
620 write_pda(kernelstack, 623 write_pda(kernelstack,
621 (unsigned long)task_stack_page(next_p) + 624 (unsigned long)task_stack_page(next_p) +