[PATCH] sparc64: 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 ee3eea16 f3169641

+5 -5
+3 -3
arch/sparc64/kernel/process.c
··· 616 616 unsigned long unused, 617 617 struct task_struct *p, struct pt_regs *regs) 618 618 { 619 - struct thread_info *t = p->thread_info; 619 + struct thread_info *t = task_thread_info(p); 620 620 char *child_trap_frame; 621 621 622 622 /* Calculate offset to stack_frame & pt_regs */ 623 - child_trap_frame = ((char *)t) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); 623 + child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); 624 624 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); 625 625 626 626 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | ··· 845 845 task->state == TASK_RUNNING) 846 846 goto out; 847 847 848 - thread_info_base = (unsigned long) task->thread_info; 848 + thread_info_base = (unsigned long) task_stack_page(task); 849 849 bias = STACK_BIAS; 850 850 fp = task_thread_info(task)->ksp + bias; 851 851
+2 -2
arch/sparc64/kernel/traps.c
··· 1808 1808 void show_stack(struct task_struct *tsk, unsigned long *_ksp) 1809 1809 { 1810 1810 unsigned long pc, fp, thread_base, ksp; 1811 - struct thread_info *tp = tsk->thread_info; 1811 + void *tp = task_stack_page(tsk); 1812 1812 struct reg_window *rw; 1813 1813 int count = 0; 1814 1814 ··· 1862 1862 return 0; 1863 1863 } 1864 1864 1865 - thread_base = (unsigned long) task->thread_info; 1865 + thread_base = (unsigned long) task_stack_page(task); 1866 1866 thread_end = thread_base + sizeof(union thread_union); 1867 1867 if (rw_addr >= thread_base && 1868 1868 rw_addr < thread_end &&