Skip to contentSkip to conversation

sh64: task_stack_page()

PATCH In review Al Viro 1 participant 1 message Jan 3, 2006 Generic include/asm header files

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 38/50 sh64: task_stack_page()

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

---

 arch/sh64/kernel/process.c |    4 ++--
 arch/sh64/lib/dbg.c        |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

9e554f8ebc7ce3339ffbb68390240499ce98a3a2

arch/sh64/kernel/process.c +2 -2
index b95d041..acb0391 100644
@@ -744,7 +744,7 @@ int copy_thread(int nr, unsigned long cl
 	}
 #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 cl
 		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 */
arch/sh64/lib/dbg.c +1 -1
index 526feda..5808733 100644
@@ -174,7 +174,7 @@ void evt_debug(int evt, int ret_addr, in
 	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;
Signature · 1 line
0.99.9.GIT