aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:05:47 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:08:53 -0500
commit36483c6b5e6cc8f29fbe5203caa7e0b836802747 (patch)
treefe3504187c6dfae43906f3484cc7bbef42502510 /arch/sparc/kernel
parentd562ef6a23feb72f32ebd23fb32fe7d2c35a85cd (diff)
[PATCH] sparc: task_stack_page()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 7eebb08a953a..fbb05a452e51 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -302,7 +302,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
302 int count = 0; 302 int count = 0;
303 303
304 if (tsk != NULL) 304 if (tsk != NULL)
305 task_base = (unsigned long) tsk->thread_info; 305 task_base = (unsigned long) task_stack_page(tsk);
306 else 306 else
307 task_base = (unsigned long) current_thread_info(); 307 task_base = (unsigned long) current_thread_info();
308 308
@@ -392,7 +392,7 @@ void flush_thread(void)
392 /* We must fixup kregs as well. */ 392 /* We must fixup kregs as well. */
393 /* XXX This was not fixed for ti for a while, worked. Unused? */ 393 /* XXX This was not fixed for ti for a while, worked. Unused? */
394 current->thread.kregs = (struct pt_regs *) 394 current->thread.kregs = (struct pt_regs *)
395 ((char *)current->thread_info + (THREAD_SIZE - TRACEREG_SZ)); 395 (task_stack_page(current) + (THREAD_SIZE - TRACEREG_SZ));
396 } 396 }
397} 397}
398 398
@@ -459,7 +459,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
459 unsigned long unused, 459 unsigned long unused,
460 struct task_struct *p, struct pt_regs *regs) 460 struct task_struct *p, struct pt_regs *regs)
461{ 461{
462 struct thread_info *ti = p->thread_info; 462 struct thread_info *ti = task_thread_info(p);
463 struct pt_regs *childregs; 463 struct pt_regs *childregs;
464 char *new_stack; 464 char *new_stack;
465 465
@@ -482,7 +482,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
482 * V V (stk.fr.) V (pt_regs) { (stk.fr.) } 482 * V V (stk.fr.) V (pt_regs) { (stk.fr.) }
483 * +----- - - - - - ------+===========+============={+==========}+ 483 * +----- - - - - - ------+===========+============={+==========}+
484 */ 484 */
485 new_stack = (char*)ti + THREAD_SIZE; 485 new_stack = task_stack_page(p) + THREAD_SIZE;
486 if (regs->psr & PSR_PS) 486 if (regs->psr & PSR_PS)
487 new_stack -= STACKFRAME_SZ; 487 new_stack -= STACKFRAME_SZ;
488 new_stack -= STACKFRAME_SZ + TRACEREG_SZ; 488 new_stack -= STACKFRAME_SZ + TRACEREG_SZ;