[PATCH] mips: 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 75bb07e7 dc8f6029

+4 -4
+3 -3
arch/mips/kernel/process.c
··· 140 140 int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, 141 141 unsigned long unused, struct task_struct *p, struct pt_regs *regs) 142 142 { 143 - struct thread_info *ti = p->thread_info; 143 + struct thread_info *ti = task_thread_info(p); 144 144 struct pt_regs *childregs; 145 145 long childksp; 146 146 p->set_child_tid = p->clear_child_tid = NULL; 147 147 148 - childksp = (unsigned long)ti + THREAD_SIZE - 32; 148 + childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32; 149 149 150 150 preempt_disable(); 151 151 ··· 407 407 if (!p || p == current || p->state == TASK_RUNNING) 408 408 return 0; 409 409 410 - stack_page = (unsigned long)p->thread_info; 410 + stack_page = (unsigned long)task_stack_page(p); 411 411 if (!stack_page || !mips_frame_info_initialized) 412 412 return 0; 413 413
+1 -1
include/asm-mips/processor.h
··· 200 200 201 201 unsigned long get_wchan(struct task_struct *p); 202 202 203 - #define __KSTK_TOS(tsk) ((unsigned long)(tsk->thread_info) + THREAD_SIZE - 32) 203 + #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32) 204 204 #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) 205 205 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) 206 206 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])