* [PATCH 16/50] sh: task_stack_page()
@ 2006-01-03 21:07 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2006-01-03 21:07 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, linux-arch
References: <20060103210515.5135@ftp.linux.org.uk>
In-Reply-To: <20060103210515.5135@ftp.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/sh/kernel/process.c | 2 +-
include/asm-sh/ptrace.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
743f991f32205d964a644b5d256695fa9f252950
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 830e842..e2854ca 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -270,7 +270,7 @@ int copy_thread(int nr, unsigned long cl
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 85aa0f4..792fc35 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
--
0.99.9.GIT
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-03 21:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-03 21:07 [PATCH 16/50] sh: task_stack_page() Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®