diff options
Diffstat (limited to 'arch/mips/math-emu/dsemul.c')
-rw-r--r-- | arch/mips/math-emu/dsemul.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index 7ea622ab8dad..4f514f3724cb 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c | |||
@@ -1,30 +1,12 @@ | |||
1 | #include <linux/compiler.h> | ||
2 | #include <linux/mm.h> | ||
3 | #include <linux/signal.h> | ||
4 | #include <linux/smp.h> | ||
5 | |||
6 | #include <asm/asm.h> | ||
7 | #include <asm/bootinfo.h> | ||
8 | #include <asm/byteorder.h> | ||
9 | #include <asm/cpu.h> | ||
10 | #include <asm/inst.h> | ||
11 | #include <asm/processor.h> | ||
12 | #include <asm/uaccess.h> | ||
13 | #include <asm/branch.h> | 1 | #include <asm/branch.h> |
14 | #include <asm/mipsregs.h> | ||
15 | #include <asm/cacheflush.h> | 2 | #include <asm/cacheflush.h> |
16 | |||
17 | #include <asm/fpu_emulator.h> | 3 | #include <asm/fpu_emulator.h> |
4 | #include <asm/inst.h> | ||
5 | #include <asm/mipsregs.h> | ||
6 | #include <asm/uaccess.h> | ||
18 | 7 | ||
19 | #include "ieee754.h" | 8 | #include "ieee754.h" |
20 | 9 | ||
21 | /* Strap kernel emulator for full MIPS IV emulation */ | ||
22 | |||
23 | #ifdef __mips | ||
24 | #undef __mips | ||
25 | #endif | ||
26 | #define __mips 4 | ||
27 | |||
28 | /* | 10 | /* |
29 | * Emulate the arbritrary instruction ir at xcp->cp0_epc. Required when | 11 | * Emulate the arbritrary instruction ir at xcp->cp0_epc. Required when |
30 | * we have to emulate the instruction in a COP1 branch delay slot. Do | 12 | * we have to emulate the instruction in a COP1 branch delay slot. Do |
@@ -59,13 +41,11 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) | |||
59 | (ir == 0)) { | 41 | (ir == 0)) { |
60 | /* NOP is easy */ | 42 | /* NOP is easy */ |
61 | regs->cp0_epc = cpc; | 43 | regs->cp0_epc = cpc; |
62 | regs->cp0_cause &= ~CAUSEF_BD; | 44 | clear_delay_slot(regs); |
63 | return 0; | 45 | return 0; |
64 | } | 46 | } |
65 | #ifdef DSEMUL_TRACE | ||
66 | printk("dsemul %lx %lx\n", regs->cp0_epc, cpc); | ||
67 | 47 | ||
68 | #endif | 48 | pr_debug("dsemul %lx %lx\n", regs->cp0_epc, cpc); |
69 | 49 | ||
70 | /* | 50 | /* |
71 | * The strategy is to push the instruction onto the user stack | 51 | * The strategy is to push the instruction onto the user stack |
@@ -167,9 +147,8 @@ int do_dsemulret(struct pt_regs *xcp) | |||
167 | * emulating the branch delay instruction. | 147 | * emulating the branch delay instruction. |
168 | */ | 148 | */ |
169 | 149 | ||
170 | #ifdef DSEMUL_TRACE | 150 | pr_debug("dsemulret\n"); |
171 | printk("dsemulret\n"); | 151 | |
172 | #endif | ||
173 | if (__get_user(epc, &fr->epc)) { /* Saved EPC */ | 152 | if (__get_user(epc, &fr->epc)) { /* Saved EPC */ |
174 | /* This is not a good situation to be in */ | 153 | /* This is not a good situation to be in */ |
175 | force_sig(SIGBUS, current); | 154 | force_sig(SIGBUS, current); |