aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r--arch/sh/kernel/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index 209cc9b42186..9005b2f12aaa 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -498,7 +498,7 @@ asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5,
498 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 498 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
499 499
500 /* Rewind */ 500 /* Rewind */
501 regs->pc -= instruction_size(regs->pc); 501 regs->pc -= instruction_size(ctrl_inw(regs->pc - 4));
502 502
503 if (notify_die(DIE_TRAP, regs, regs->tra & 0xff, 503 if (notify_die(DIE_TRAP, regs, regs->tra & 0xff,
504 SIGTRAP) == NOTIFY_STOP) 504 SIGTRAP) == NOTIFY_STOP)
@@ -517,7 +517,7 @@ asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5,
517 struct pt_regs *regs = RELOC_HIDE(&__regs, 0); 517 struct pt_regs *regs = RELOC_HIDE(&__regs, 0);
518 518
519 /* Rewind */ 519 /* Rewind */
520 regs->pc -= instruction_size(regs->pc); 520 regs->pc -= instruction_size(ctrl_inw(regs->pc - 4));
521 521
522 if (notify_die(DIE_TRAP, regs, TRAPA_BUG_OPCODE & 0xff, 522 if (notify_die(DIE_TRAP, regs, TRAPA_BUG_OPCODE & 0xff,
523 SIGTRAP) == NOTIFY_STOP) 523 SIGTRAP) == NOTIFY_STOP)