diff options
| author | Maciej W. Rozycki <macro@linux-mips.org> | 2015-04-03 18:26:21 -0400 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-07 19:09:53 -0400 |
| commit | 68893e0051419ccdc14fd6eafcdecc96533c6cc3 (patch) | |
| tree | 047489f3daa3506b4bbadeb62f68bcef9fcbd023 /arch/mips/kernel | |
| parent | 18a2c2c6b9319503eeac8a38b62fc82c9ff81b0d (diff) | |
MIPS: Correct MIPS16 BREAK code interpretation
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>
Diffstat (limited to 'arch/mips/kernel')
| -rw-r--r-- | arch/mips/kernel/traps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 5e1f28779340..b6f23343a8db 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
| @@ -925,7 +925,7 @@ asmlinkage void do_bp(struct pt_regs *regs) | |||
| 925 | if (__get_user(instr[0], | 925 | if (__get_user(instr[0], |
| 926 | (u16 __user *)msk_isa16_mode(epc))) | 926 | (u16 __user *)msk_isa16_mode(epc))) |
| 927 | goto out_sigsegv; | 927 | goto out_sigsegv; |
| 928 | bcode = (instr[0] >> 6) & 0x3f; | 928 | bcode = (instr[0] >> 5) & 0x3f; |
| 929 | do_trap_or_bp(regs, bcode, "Break"); | 929 | do_trap_or_bp(regs, bcode, "Break"); |
| 930 | goto out; | 930 | goto out; |
| 931 | } | 931 | } |
