aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64')
-rw-r--r--arch/sh64/kernel/process.c4
-rw-r--r--arch/sh64/lib/dbg.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index 419b5a710441..1da9c61d6823 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -744,7 +744,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
744 } 744 }
745#endif 745#endif
746 /* Copy from sh version */ 746 /* Copy from sh version */
747 childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p->thread_info )) - 1; 747 childregs = (struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1;
748 748
749 *childregs = *regs; 749 *childregs = *regs;
750 750
@@ -752,7 +752,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
752 childregs->regs[15] = usp; 752 childregs->regs[15] = usp;
753 p->thread.uregs = childregs; 753 p->thread.uregs = childregs;
754 } else { 754 } else {
755 childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE; 755 childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE;
756 } 756 }
757 757
758 childregs->regs[9] = 0; /* Set return value for child */ 758 childregs->regs[9] = 0; /* Set return value for child */
diff --git a/arch/sh64/lib/dbg.c b/arch/sh64/lib/dbg.c
index 526fedae6db8..58087331b8a6 100644
--- a/arch/sh64/lib/dbg.c
+++ b/arch/sh64/lib/dbg.c
@@ -174,7 +174,7 @@ void evt_debug(int evt, int ret_addr, int event, int tra, struct pt_regs *regs)
174 struct ring_node *rr; 174 struct ring_node *rr;
175 175
176 pid = current->pid; 176 pid = current->pid;
177 stack_bottom = (unsigned long) current->thread_info; 177 stack_bottom = (unsigned long) task_stack_page(current);
178 asm volatile("ori r15, 0, %0" : "=r" (sp)); 178 asm volatile("ori r15, 0, %0" : "=r" (sp));
179 rr = event_ring + event_ptr; 179 rr = event_ring + event_ptr;
180 rr->evt = evt; 180 rr->evt = evt;