From: Al Viro Signed-off-by: Al Viro Signed-off-by: Andrew Morton --- arch/x86_64/kernel/process.c | 6 +++--- arch/x86_64/kernel/smpboot.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff -puN arch/x86_64/kernel/process.c~amd64-task_stack_page arch/x86_64/kernel/process.c --- devel/arch/x86_64/kernel/process.c~amd64-task_stack_page 2006-01-04 22:01:48.000000000 -0800 +++ devel-akpm/arch/x86_64/kernel/process.c 2006-01-04 22:01:48.000000000 -0800 @@ -451,7 +451,7 @@ int copy_thread(int nr, unsigned long cl struct task_struct *me = current; childregs = ((struct pt_regs *) - (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; + (THREAD_SIZE + task_stack_page(p))) - 1; *childregs = *regs; childregs->rax = 0; @@ -617,7 +617,7 @@ __switch_to(struct task_struct *prev_p, write_pda(oldrsp, next->userrsp); write_pda(pcurrent, next_p); write_pda(kernelstack, - (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET); + task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); /* * Now maybe reload the debug registers @@ -733,7 +733,7 @@ unsigned long get_wchan(struct task_stru if (!p || p == current || p->state==TASK_RUNNING) return 0; - stack = (unsigned long)p->thread_info; + stack = (unsigned long)task_stack_page(p); if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE) return 0; fp = *(u64 *)(p->thread.rsp); diff -puN arch/x86_64/kernel/smpboot.c~amd64-task_stack_page arch/x86_64/kernel/smpboot.c --- devel/arch/x86_64/kernel/smpboot.c~amd64-task_stack_page 2006-01-04 22:01:48.000000000 -0800 +++ devel-akpm/arch/x86_64/kernel/smpboot.c 2006-01-04 22:01:48.000000000 -0800 @@ -761,7 +761,7 @@ static int __cpuinit do_boot_cpu(int cpu if (c_idle.idle) { c_idle.idle->thread.rsp = (unsigned long) (((struct pt_regs *) - (THREAD_SIZE + (unsigned long) c_idle.idle->thread_info)) - 1); + (THREAD_SIZE + task_stack_page(c_idle.idle))) - 1); init_idle(c_idle.idle, cpu); goto do_rest; } _