diff options
Diffstat (limited to 'include/asm-mips/processor.h')
-rw-r--r-- | include/asm-mips/processor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index de53055a62ae..ab3123ea5658 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -200,11 +200,11 @@ 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 __PT_REG(reg) ((long)&((struct pt_regs *)0)->reg - sizeof(struct pt_regs)) | ||
204 | #define __KSTK_TOS(tsk) ((unsigned long)(tsk->thread_info) + THREAD_SIZE - 32) | 203 | #define __KSTK_TOS(tsk) ((unsigned long)(tsk->thread_info) + THREAD_SIZE - 32) |
205 | #define KSTK_EIP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_epc))) | 204 | #define task_pt_regs(tsk) ((struct pt_regs *)__KSTK_TOS(tsk) - 1) |
206 | #define KSTK_ESP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(regs[29]))) | 205 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) |
207 | #define KSTK_STATUS(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_status))) | 206 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) |
207 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) | ||
208 | 208 | ||
209 | #define cpu_relax() barrier() | 209 | #define cpu_relax() barrier() |
210 | 210 | ||