aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/traps.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index da0c29422cf2..cf7ac5483f53 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1025,6 +1025,24 @@ asmlinkage void do_cpu(struct pt_regs *regs)
1025 1025
1026 return; 1026 return;
1027 1027
1028 case 3:
1029 /*
1030 * Old (MIPS I and MIPS II) processors will set this code
1031 * for COP1X opcode instructions that replaced the original
1032 * COP3 space. We don't limit COP1 space instructions in
1033 * the emulator according to the CPU ISA, so we want to
1034 * treat COP1X instructions consistently regardless of which
1035 * code the CPU chose. Therefore we redirect this trap to
1036 * the FP emulator too.
1037 *
1038 * Then some newer FPU-less processors use this code
1039 * erroneously too, so they are covered by this choice
1040 * as well.
1041 */
1042 if (raw_cpu_has_fpu)
1043 break;
1044 /* Fall through. */
1045
1028 case 1: 1046 case 1:
1029 if (used_math()) /* Using the FPU again. */ 1047 if (used_math()) /* Using the FPU again. */
1030 own_fpu(1); 1048 own_fpu(1);
@@ -1048,9 +1066,6 @@ asmlinkage void do_cpu(struct pt_regs *regs)
1048 case 2: 1066 case 2:
1049 raw_notifier_call_chain(&cu2_chain, CU2_EXCEPTION, regs); 1067 raw_notifier_call_chain(&cu2_chain, CU2_EXCEPTION, regs);
1050 return; 1068 return;
1051
1052 case 3:
1053 break;
1054 } 1069 }
1055 1070
1056 force_sig(SIGILL, current); 1071 force_sig(SIGILL, current);