aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:08:58 -0500
commit40bc9c671a9f0a5189c07a2b4280aec9b40e30cd (patch)
treeb44709dbe0a5f825f6fc0a0e0bfeac1028d8c443 /include/asm-mips
parent6450578f32cdca587ae5f148e2118b2fcc36bb11 (diff)
[PATCH] mips: task_pt_regs()
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>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/processor.h8
-rw-r--r--include/asm-mips/system.h2
2 files changed, 5 insertions, 5 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
201unsigned long get_wchan(struct task_struct *p); 201unsigned 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
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 5f761ad5a8d9..e8e5d4143377 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -159,7 +159,7 @@ struct task_struct;
159do { \ 159do { \
160 if (cpu_has_dsp) \ 160 if (cpu_has_dsp) \
161 __save_dsp(prev); \ 161 __save_dsp(prev); \
162 (last) = resume(prev, next, next->thread_info); \ 162 (last) = resume(prev, next, task_thread_info(next)); \
163 if (cpu_has_dsp) \ 163 if (cpu_has_dsp) \
164 __restore_dsp(current); \ 164 __restore_dsp(current); \
165} while(0) 165} while(0)