diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-20 04:08:06 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:50 -0500 |
commit | 5a4f7c66be981c6b5f44a4d66a14ea6ac9b7b6b0 (patch) | |
tree | a605424a32ce11d189a1aa1385c3fc22f972449f /arch/sh/kernel/process_32.c | |
parent | 811d50cb43eb730cc325df0c6913556e25739797 (diff) |
sh: Share bug/debug traps across _32 and _64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r-- | arch/sh/kernel/process_32.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index c9291f462311..b48324867eee 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -482,49 +482,3 @@ asmlinkage void break_point_trap(void) | |||
482 | 482 | ||
483 | force_sig(SIGTRAP, current); | 483 | force_sig(SIGTRAP, current); |
484 | } | 484 | } |
485 | |||
486 | /* | ||
487 | * Generic trap handler. | ||
488 | */ | ||
489 | asmlinkage void debug_trap_handler(unsigned long r4, unsigned long r5, | ||
490 | unsigned long r6, unsigned long r7, | ||
491 | struct pt_regs __regs) | ||
492 | { | ||
493 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
494 | |||
495 | /* Rewind */ | ||
496 | regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); | ||
497 | |||
498 | if (notify_die(DIE_TRAP, "debug trap", regs, 0, regs->tra & 0xff, | ||
499 | SIGTRAP) == NOTIFY_STOP) | ||
500 | return; | ||
501 | |||
502 | force_sig(SIGTRAP, current); | ||
503 | } | ||
504 | |||
505 | /* | ||
506 | * Special handler for BUG() traps. | ||
507 | */ | ||
508 | asmlinkage void bug_trap_handler(unsigned long r4, unsigned long r5, | ||
509 | unsigned long r6, unsigned long r7, | ||
510 | struct pt_regs __regs) | ||
511 | { | ||
512 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
513 | |||
514 | /* Rewind */ | ||
515 | regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); | ||
516 | |||
517 | if (notify_die(DIE_TRAP, "bug trap", regs, 0, TRAPA_BUG_OPCODE & 0xff, | ||
518 | SIGTRAP) == NOTIFY_STOP) | ||
519 | return; | ||
520 | |||
521 | #ifdef CONFIG_BUG | ||
522 | if (__kernel_text_address(instruction_pointer(regs))) { | ||
523 | u16 insn = *(u16 *)instruction_pointer(regs); | ||
524 | if (insn == TRAPA_BUG_OPCODE) | ||
525 | handle_BUG(regs); | ||
526 | } | ||
527 | #endif | ||
528 | |||
529 | force_sig(SIGTRAP, current); | ||
530 | } | ||