Skip to content

Commit e8f80cc

Browse files
Markos Chandrasralfbaechle
authored andcommitted
MIPS: math-emu: Allow m{f,t}hc emulation on MIPS R6
The mfhc/mthc instructions are supported on MIPS R6 so emulate them if needed. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: <stable@vger.kernel.org> # 4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10737/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 1664574 commit e8f80cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/math-emu/cp1emu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
11371137
break;
11381138

11391139
case mfhc_op:
1140-
if (!cpu_has_mips_r2)
1140+
if (!cpu_has_mips_r2_r6)
11411141
goto sigill;
11421142

11431143
/* copregister rd -> gpr[rt] */
@@ -1148,7 +1148,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
11481148
break;
11491149

11501150
case mthc_op:
1151-
if (!cpu_has_mips_r2)
1151+
if (!cpu_has_mips_r2_r6)
11521152
goto sigill;
11531153

11541154
/* copregister rd <- gpr[rt] */

0 commit comments

Comments
 (0)