[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>

authored by Al Viro and committed by Linus Torvalds 36483c6b d562ef6a

+4 -4
+4 -4
arch/sparc/kernel/process.c
··· 302 302 int count = 0; 303 303 304 304 if (tsk != NULL) 305 - task_base = (unsigned long) tsk->thread_info; 305 + task_base = (unsigned long) task_stack_page(tsk); 306 306 else 307 307 task_base = (unsigned long) current_thread_info(); 308 308 ··· 392 392 /* We must fixup kregs as well. */ 393 393 /* XXX This was not fixed for ti for a while, worked. Unused? */ 394 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 459 unsigned long unused, 460 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 463 struct pt_regs *childregs; 464 464 char *new_stack; 465 465 ··· 482 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 486 if (regs->psr & PSR_PS) 487 487 new_stack -= STACKFRAME_SZ; 488 488 new_stack -= STACKFRAME_SZ + TRACEREG_SZ;