Skip to contentSkip to conversation

sparc: 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 18/50 sparc: task_stack_page()

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

---

 arch/sparc/kernel/process.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

0015df0826bdd6f2aad29b05149ea3f9475d204a

arch/sparc/kernel/process.c +4 -4
index 7eebb08..fbb05a4 100644
@@ -302,7 +302,7 @@ void show_stack(struct task_struct *tsk,
 	int count = 0;
 
 	if (tsk != NULL)
-		task_base = (unsigned long) tsk->thread_info;
+		task_base = (unsigned long) task_stack_page(tsk);
 	else
 		task_base = (unsigned long) current_thread_info();
 
@@ -392,7 +392,7 @@ void flush_thread(void)
 		/* We must fixup kregs as well. */
 		/* XXX This was not fixed for ti for a while, worked. Unused? */
 		current->thread.kregs = (struct pt_regs *)
-		    ((char *)current->thread_info + (THREAD_SIZE - TRACEREG_SZ));
+		    (task_stack_page(current) + (THREAD_SIZE - TRACEREG_SZ));
 	}
 }
 
@@ -459,7 +459,7 @@ int copy_thread(int nr, unsigned long cl
 		unsigned long unused,
 		struct task_struct *p, struct pt_regs *regs)
 {
-	struct thread_info *ti = p->thread_info;
+	struct thread_info *ti = task_thread_info(p);
 	struct pt_regs *childregs;
 	char *new_stack;
 
@@ -482,7 +482,7 @@ int copy_thread(int nr, unsigned long cl
 	 *  V                      V (stk.fr.) V  (pt_regs)  { (stk.fr.) }
 	 *  +----- - - - - - ------+===========+============={+==========}+
 	 */
-	new_stack = (char*)ti + THREAD_SIZE;
+	new_stack = task_stack_page(p) + THREAD_SIZE;
 	if (regs->psr & PSR_PS)
 		new_stack -= STACKFRAME_SZ;
 	new_stack -= STACKFRAME_SZ + TRACEREG_SZ;
Signature · 1 line
0.99.9.GIT