Commit 75bb07e7 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] mips: task_stack_page()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent dc8f6029
...@@ -140,12 +140,12 @@ void flush_thread(void) ...@@ -140,12 +140,12 @@ void flush_thread(void)
int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned long unused, struct task_struct *p, struct pt_regs *regs) 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; struct pt_regs *childregs;
long childksp; long childksp;
p->set_child_tid = p->clear_child_tid = NULL; p->set_child_tid = p->clear_child_tid = NULL;
childksp = (unsigned long)ti + THREAD_SIZE - 32; childksp = (unsigned long)task_stack_page(p) + THREAD_SIZE - 32;
preempt_disable(); preempt_disable();
...@@ -407,7 +407,7 @@ unsigned long get_wchan(struct task_struct *p) ...@@ -407,7 +407,7 @@ unsigned long get_wchan(struct task_struct *p)
if (!p || p == current || p->state == TASK_RUNNING) if (!p || p == current || p->state == TASK_RUNNING)
return 0; return 0;
stack_page = (unsigned long)p->thread_info; stack_page = (unsigned long)task_stack_page(p);
if (!stack_page || !mips_frame_info_initialized) if (!stack_page || !mips_frame_info_initialized)
return 0; return 0;
......
...@@ -200,7 +200,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long ...@@ -200,7 +200,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
#define __KSTK_TOS(tsk) ((unsigned long)(tsk->thread_info) + THREAD_SIZE - 32) #define __KSTK_TOS(tsk) ((unsigned long)task_stack_page(tsk) + THREAD_SIZE - 32)
#define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1)
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment