Skip to content

Commit b730920

Browse files
paulburtongregkh
authored andcommitted
MIPS: math-emu: Remove pr_err() calls from fpu_emu()
commit ca8eb05 upstream. The FPU emulator includes 2 calls to pr_err() which are triggered by invalid instruction encodings for MIPSr6 cmp.cond.fmt instructions. These cases are not kernel errors, merely invalid instructions which are already handled by delivering a SIGILL which will provide notification that something failed in cases where that makes sense. In cases where that SIGILL is somewhat expected & being handled, for example when crashme happens to generate one of the affected bad encodings, the message is printed with no useful context about what triggered it & spams the kernel log for no good reason. Remove the pr_err() calls to make crashme run silently & treat the bad encodings the same way we do others, with a SIGILL & no further kernel log output. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: f8c3c67 ("MIPS: math-emu: Add support for the CMP.condn.fmt R6 instruction") Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17253/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a844e28 commit b730920

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/mips/math-emu/cp1emu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,6 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
23862386
break;
23872387
default:
23882388
/* Reserved R6 ops */
2389-
pr_err("Reserved MIPS R6 CMP.condn.S operation\n");
23902389
return SIGILL;
23912390
}
23922391
}
@@ -2460,7 +2459,6 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
24602459
break;
24612460
default:
24622461
/* Reserved R6 ops */
2463-
pr_err("Reserved MIPS R6 CMP.condn.D operation\n");
24642462
return SIGILL;
24652463
}
24662464
}

0 commit comments

Comments
 (0)