From: Al Viro Date: Thu, 12 Jan 2006 09:05:45 +0000 (-0800) Subject: [PATCH] sh: task_stack_page() X-Git-Tag: v2.6.16-rc1~258 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=308a792f7c563a7af6e325274c63812f98988d6f;p=linux-2.6-omap-h63xx.git [PATCH] sh: task_stack_page() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 35415d0be39..aac15e42d03 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -270,7 +270,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, if (user_mode(regs)) { childregs->regs[15] = usp; } else { - childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE; + childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; } if (clone_flags & CLONE_SETTLS) { childregs->gbr = childregs->regs[0]; diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index 85aa0f4de81..792fc35bd62 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h @@ -93,11 +93,11 @@ extern void show_regs(struct pt_regs *); #ifdef CONFIG_SH_DSP #define task_pt_regs(task) \ - ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \ + ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) #else #define task_pt_regs(task) \ - ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \ + ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ - sizeof(unsigned long)) - 1) #endif