From ee8c1dd44305cca9d0ded248de991f67b55ec622 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:01 -0800 Subject: [PATCH] [PATCH] sh64: task_stack_page() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sh64/kernel/process.c | 4 ++-- arch/sh64/lib/dbg.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index 419b5a7104..1da9c61d68 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, } #endif /* Copy from sh version */ - childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p->thread_info )) - 1; + childregs = (struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1; *childregs = *regs; @@ -752,7 +752,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, childregs->regs[15] = usp; p->thread.uregs = childregs; } else { - childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE; + childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; } childregs->regs[9] = 0; /* Set return value for child */ diff --git a/arch/sh64/lib/dbg.c b/arch/sh64/lib/dbg.c index 526fedae6d..58087331b8 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) struct ring_node *rr; pid = current->pid; - stack_bottom = (unsigned long) current->thread_info; + stack_bottom = (unsigned long) task_stack_page(current); asm volatile("ori r15, 0, %0" : "=r" (sp)); rr = event_ring + event_ptr; rr->evt = evt; -- 2.39.5