Skip to content

Commit

Permalink
MIPS: Correct MIPS16 BREAK code interpretation
Browse files Browse the repository at this point in the history
Correct the interpretation of the immediate MIPS16 BREAK instruction
code embedded in the instruction word across bits 10:5 rather than 11:6
as current code implies, fixing the interpretation of integer overflow
and divide by zero traps.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9695/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Maciej W. Rozycki authored and Ralf Baechle committed Apr 7, 2015
1 parent 18a2c2c commit 68893e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ asmlinkage void do_bp(struct pt_regs *regs)
if (__get_user(instr[0],
(u16 __user *)msk_isa16_mode(epc)))
goto out_sigsegv;
bcode = (instr[0] >> 6) & 0x3f;
bcode = (instr[0] >> 5) & 0x3f;
do_trap_or_bp(regs, bcode, "Break");
goto out;
}
Expand Down

0 comments on commit 68893e0

Please sign in to comment.