aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index dc6eaf4d93ea..88f04f0d2d21 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1349,19 +1349,18 @@ asmlinkage void do_cpu(struct pt_regs *regs)
1349 1349
1350 case 3: 1350 case 3:
1351 /* 1351 /*
1352 * Old (MIPS I and MIPS II) processors will set this code 1352 * The COP3 opcode space and consequently the CP0.Status.CU3
1353 * for COP1X opcode instructions that replaced the original 1353 * bit and the CP0.Cause.CE=3 encoding have been removed as
1354 * COP3 space. We don't limit COP1 space instructions in 1354 * of the MIPS III ISA. From the MIPS IV and MIPS32r2 ISAs
1355 * the emulator according to the CPU ISA, so we want to 1355 * up the space has been reused for COP1X instructions, that
1356 * treat COP1X instructions consistently regardless of which 1356 * are enabled by the CP0.Status.CU1 bit and consequently
1357 * code the CPU chose. Therefore we redirect this trap to 1357 * use the CP0.Cause.CE=1 encoding for Coprocessor Unusable
1358 * the FP emulator too. 1358 * exceptions. Some FPU-less processors that implement one
1359 * 1359 * of these ISAs however use this code erroneously for COP1X
1360 * Then some newer FPU-less processors use this code 1360 * instructions. Therefore we redirect this trap to the FP
1361 * erroneously too, so they are covered by this choice 1361 * emulator too.
1362 * as well.
1363 */ 1362 */
1364 if (raw_cpu_has_fpu) { 1363 if (raw_cpu_has_fpu || !cpu_has_mips_4_5_64_r2_r6) {
1365 force_sig(SIGILL, current); 1364 force_sig(SIGILL, current);
1366 break; 1365 break;
1367 } 1366 }