diff options
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index dbfa47cdc8c1..4a0552dbcf4a 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -761,6 +761,12 @@ static int simulate_fp(struct pt_regs *regs, unsigned int opcode, | |||
761 | sig = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1, | 761 | sig = fpu_emulator_cop1Handler(regs, ¤t->thread.fpu, 1, |
762 | &fault_addr); | 762 | &fault_addr); |
763 | 763 | ||
764 | /* | ||
765 | * We can't allow the emulated instruction to leave any of | ||
766 | * the cause bits set in $fcr31. | ||
767 | */ | ||
768 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; | ||
769 | |||
764 | /* If something went wrong, signal */ | 770 | /* If something went wrong, signal */ |
765 | process_fpemu_return(sig, fault_addr); | 771 | process_fpemu_return(sig, fault_addr); |
766 | 772 | ||
@@ -807,7 +813,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
807 | 813 | ||
808 | /* | 814 | /* |
809 | * We can't allow the emulated instruction to leave any of | 815 | * We can't allow the emulated instruction to leave any of |
810 | * the cause bit set in $fcr31. | 816 | * the cause bits set in $fcr31. |
811 | */ | 817 | */ |
812 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; | 818 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; |
813 | 819 | ||
@@ -1384,6 +1390,13 @@ asmlinkage void do_cpu(struct pt_regs *regs) | |||
1384 | sig = fpu_emulator_cop1Handler(regs, | 1390 | sig = fpu_emulator_cop1Handler(regs, |
1385 | ¤t->thread.fpu, | 1391 | ¤t->thread.fpu, |
1386 | 0, &fault_addr); | 1392 | 0, &fault_addr); |
1393 | |||
1394 | /* | ||
1395 | * We can't allow the emulated instruction to leave | ||
1396 | * any of the cause bits set in $fcr31. | ||
1397 | */ | ||
1398 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; | ||
1399 | |||
1387 | if (!process_fpemu_return(sig, fault_addr) && !err) | 1400 | if (!process_fpemu_return(sig, fault_addr) && !err) |
1388 | mt_ase_fp_affinity(); | 1401 | mt_ase_fp_affinity(); |
1389 | } | 1402 | } |