Skip to contentSkip to conversation

sh: task_stack_page()

PATCH In review Al Viro 1 participant 1 message Jan 3, 2006

Subsystems (2)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 16/50 sh: task_stack_page()

References: <[email protected]>
In-Reply-To: <[email protected]>

---

 arch/sh/kernel/process.c |    2 +-
 include/asm-sh/ptrace.h  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

743f991f32205d964a644b5d256695fa9f252950

arch/sh/kernel/process.c +1 -1
index 830e842..e2854ca 100644
@@ -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];
include/asm-sh/ptrace.h +2 -2
index 85aa0f4..792fc35 100644
@@ -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
 
Signature · 1 line
0.99.9.GIT