diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:59 -0500 |
commit | 75bb07e788abb060cc93b6f4dc48a70a53c1406b (patch) | |
tree | a7c050e5ada04c8900f23e057c425b51c2a96712 | |
parent | dc8f6029cd51af1b148846a32e68d69013a5cc0f (diff) |
[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>
-rw-r--r-- | arch/mips/kernel/process.c | 6 | ||||
-rw-r--r-- | include/asm-mips/processor.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index aca56f4a5d50..fa98f10d0132 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -140,12 +140,12 @@ void flush_thread(void) | |||
140 | int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | 140 | int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, |
141 | unsigned long unused, struct task_struct *p, struct pt_regs *regs) | 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 | struct pt_regs *childregs; | 144 | struct pt_regs *childregs; |
145 | long childksp; | 145 | long childksp; |
146 | p->set_child_tid = p->clear_child_tid = NULL; | 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 | preempt_disable(); | 150 | preempt_disable(); |
151 | 151 | ||
@@ -407,7 +407,7 @@ unsigned long get_wchan(struct task_struct *p) | |||
407 | if (!p || p == current || p->state == TASK_RUNNING) | 407 | if (!p || p == current || p->state == TASK_RUNNING) |
408 | return 0; | 408 | return 0; |
409 | 409 | ||
410 | stack_page = (unsigned long)p->thread_info; | 410 | stack_page = (unsigned long)task_stack_page(p); |
411 | if (!stack_page || !mips_frame_info_initialized) | 411 | if (!stack_page || !mips_frame_info_initialized) |
412 | return 0; | 412 | return 0; |
413 | 413 | ||
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index ab3123ea5658..39d2bd50fece 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -200,7 +200,7 @@ extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long | |||
200 | 200 | ||
201 | unsigned long get_wchan(struct task_struct *p); | 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 | #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) | 204 | #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) |
205 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) | 205 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) |
206 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) | 206 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) |