aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu/dsemul.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-28 12:55:57 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:46 -0400
commit333d1f6794b341df11f286f5dca123c6dc64a770 (patch)
tree65218399e74b00d17e1b86b2086d781866028d85 /arch/mips/math-emu/dsemul.c
parent0bd5d2e9ec8cc04a0225c590d35dd097e6b3a3f6 (diff)
Gross macro abuse. Get rid of gpreg_t, vaddr_t, REG_TO_VA and
VA_TO_REG. Who ever wrote this apparently did enjoy the C Puzzle Book. ISBN 0201604612, a little old but still fun reading for the next blackout ;) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu/dsemul.c')
-rw-r--r--arch/mips/math-emu/dsemul.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c
index 688be60c5385..d48bb62495bf 100644
--- a/arch/mips/math-emu/dsemul.c
+++ b/arch/mips/math-emu/dsemul.c
@@ -49,10 +49,10 @@ struct emuframe {
49 mips_instruction emul; 49 mips_instruction emul;
50 mips_instruction badinst; 50 mips_instruction badinst;
51 mips_instruction cookie; 51 mips_instruction cookie;
52 gpreg_t epc; 52 unsigned long epc;
53}; 53};
54 54
55int mips_dsemul(struct pt_regs *regs, mips_instruction ir, gpreg_t cpc) 55int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
56{ 56{
57 extern asmlinkage void handle_dsemulret(void); 57 extern asmlinkage void handle_dsemulret(void);
58 mips_instruction *dsemul_insns; 58 mips_instruction *dsemul_insns;
@@ -88,7 +88,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, gpreg_t cpc)
88 */ 88 */
89 89
90 /* Ensure that the two instructions are in the same cache line */ 90 /* Ensure that the two instructions are in the same cache line */
91 dsemul_insns = (mips_instruction *) REG_TO_VA ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7); 91 dsemul_insns = (mips_instruction *) ((regs->regs[29] - sizeof(struct emuframe)) & ~0x7);
92 fr = (struct emuframe *) dsemul_insns; 92 fr = (struct emuframe *) dsemul_insns;
93 93
94 /* Verify that the stack pointer is not competely insane */ 94 /* Verify that the stack pointer is not competely insane */
@@ -105,7 +105,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, gpreg_t cpc)
105 return SIGBUS; 105 return SIGBUS;
106 } 106 }
107 107
108 regs->cp0_epc = VA_TO_REG & fr->emul; 108 regs->cp0_epc = (unsigned long) &fr->emul;
109 109
110 flush_cache_sigtramp((unsigned long)&fr->badinst); 110 flush_cache_sigtramp((unsigned long)&fr->badinst);
111 111
@@ -115,7 +115,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, gpreg_t cpc)
115int do_dsemulret(struct pt_regs *xcp) 115int do_dsemulret(struct pt_regs *xcp)
116{ 116{
117 struct emuframe *fr; 117 struct emuframe *fr;
118 gpreg_t epc; 118 unsigned long epc;
119 u32 insn, cookie; 119 u32 insn, cookie;
120 int err = 0; 120 int err = 0;
121 121