aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/process.c6
-rw-r--r--arch/x86_64/kernel/smpboot.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 68df519c83e6..8ded407e4a94 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -451,7 +451,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
451 struct task_struct *me = current; 451 struct task_struct *me = current;
452 452
453 childregs = ((struct pt_regs *) 453 childregs = ((struct pt_regs *)
454 (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; 454 (THREAD_SIZE + task_stack_page(p))) - 1;
455 *childregs = *regs; 455 *childregs = *regs;
456 456
457 childregs->rax = 0; 457 childregs->rax = 0;
@@ -590,7 +590,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
590 write_pda(oldrsp, next->userrsp); 590 write_pda(oldrsp, next->userrsp);
591 write_pda(pcurrent, next_p); 591 write_pda(pcurrent, next_p);
592 write_pda(kernelstack, 592 write_pda(kernelstack,
593 (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET); 593 task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET);
594 594
595 /* 595 /*
596 * Now maybe reload the debug registers 596 * Now maybe reload the debug registers
@@ -704,7 +704,7 @@ unsigned long get_wchan(struct task_struct *p)
704 704
705 if (!p || p == current || p->state==TASK_RUNNING) 705 if (!p || p == current || p->state==TASK_RUNNING)
706 return 0; 706 return 0;
707 stack = (unsigned long)p->thread_info; 707 stack = (unsigned long)task_stack_page(p);
708 if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE) 708 if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE)
709 return 0; 709 return 0;
710 fp = *(u64 *)(p->thread.rsp); 710 fp = *(u64 *)(p->thread.rsp);
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index d16a2fae270a..a28756ef7cef 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -776,7 +776,7 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
776 776
777 if (c_idle.idle) { 777 if (c_idle.idle) {
778 c_idle.idle->thread.rsp = (unsigned long) (((struct pt_regs *) 778 c_idle.idle->thread.rsp = (unsigned long) (((struct pt_regs *)
779 (THREAD_SIZE + (unsigned long) c_idle.idle->thread_info)) - 1); 779 (THREAD_SIZE + task_stack_page(c_idle.idle))) - 1);
780 init_idle(c_idle.idle, cpu); 780 init_idle(c_idle.idle, cpu);
781 goto do_rest; 781 goto do_rest;
782 } 782 }