aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/kernel/process.c2
-rw-r--r--include/asm-sh/ptrace.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 35415d0be39e..aac15e42d03b 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,
270 if (user_mode(regs)) { 270 if (user_mode(regs)) {
271 childregs->regs[15] = usp; 271 childregs->regs[15] = usp;
272 } else { 272 } else {
273 childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE; 273 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE;
274 } 274 }
275 if (clone_flags & CLONE_SETTLS) { 275 if (clone_flags & CLONE_SETTLS) {
276 childregs->gbr = childregs->regs[0]; 276 childregs->gbr = childregs->regs[0];
diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h
index 85aa0f4de819..792fc35bd624 100644
--- a/include/asm-sh/ptrace.h
+++ b/include/asm-sh/ptrace.h
@@ -93,11 +93,11 @@ extern void show_regs(struct pt_regs *);
93 93
94#ifdef CONFIG_SH_DSP 94#ifdef CONFIG_SH_DSP
95#define task_pt_regs(task) \ 95#define task_pt_regs(task) \
96 ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \ 96 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
97 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1) 97 - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
98#else 98#else
99#define task_pt_regs(task) \ 99#define task_pt_regs(task) \
100 ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \ 100 ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \
101 - sizeof(unsigned long)) - 1) 101 - sizeof(unsigned long)) - 1)
102#endif 102#endif
103 103