aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-10-21 05:21:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-10-21 10:34:41 -0400
commita5466d7bba9af83a82cc7c081b2a7d557cde3204 (patch)
tree0f4d00fbaf3a705dc7ea38b7096c6ed4e0d601d2 /arch
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
MIPS: cp1emu: Fix ISA restrictions for cop1x_op instructions
Commit 08a07904e1828 ("MIPS: math-emu: Remove most ifdefery") removed the #ifdef ISA conditions and switched to runtime detection. However, according to the instruction set manual, the cop1x_op instructions are available in >=MIPS32r2 as well. This fixes a problem on MIPS32r2 with the ntpd package which failed to execute with a SIGILL exit code due to the fact that a madd.d instruction was not being emulated. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Fixes: 08a07904e1828 ("MIPS: math-emu: Remove most ifdefery") Cc: <stable@vger.kernel.org> # v3.16+ Cc: linux-mips@linux-mips.org Reviewed-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/8173/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/math-emu/cp1emu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 7a4727795a70..51a0fde4bec1 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1023,7 +1023,7 @@ emul:
1023 goto emul; 1023 goto emul;
1024 1024
1025 case cop1x_op: 1025 case cop1x_op:
1026 if (cpu_has_mips_4_5 || cpu_has_mips64) 1026 if (cpu_has_mips_4_5 || cpu_has_mips64 || cpu_has_mips32r2)
1027 /* its one of ours */ 1027 /* its one of ours */
1028 goto emul; 1028 goto emul;
1029 1029
@@ -1068,7 +1068,7 @@ emul:
1068 break; 1068 break;
1069 1069
1070 case cop1x_op: 1070 case cop1x_op:
1071 if (!cpu_has_mips_4_5 && !cpu_has_mips64) 1071 if (!cpu_has_mips_4_5 && !cpu_has_mips64 && !cpu_has_mips32r2)
1072 return SIGILL; 1072 return SIGILL;
1073 1073
1074 sig = fpux_emu(xcp, ctx, ir, fault_addr); 1074 sig = fpux_emu(xcp, ctx, ir, fault_addr);