diff options
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index bbddb86c1fa1..cc4a3f120f54 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -91,6 +91,7 @@ int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | |||
91 | void (*board_nmi_handler_setup)(void); | 91 | void (*board_nmi_handler_setup)(void); |
92 | void (*board_ejtag_handler_setup)(void); | 92 | void (*board_ejtag_handler_setup)(void); |
93 | void (*board_bind_eic_interrupt)(int irq, int regset); | 93 | void (*board_bind_eic_interrupt)(int irq, int regset); |
94 | void (*board_ebase_setup)(void); | ||
94 | 95 | ||
95 | 96 | ||
96 | static void show_raw_backtrace(unsigned long reg29) | 97 | static void show_raw_backtrace(unsigned long reg29) |
@@ -400,7 +401,7 @@ void __noreturn die(const char *str, struct pt_regs *regs) | |||
400 | panic("Fatal exception in interrupt"); | 401 | panic("Fatal exception in interrupt"); |
401 | 402 | ||
402 | if (panic_on_oops) { | 403 | if (panic_on_oops) { |
403 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | 404 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds"); |
404 | ssleep(5); | 405 | ssleep(5); |
405 | panic("Fatal exception"); | 406 | panic("Fatal exception"); |
406 | } | 407 | } |
@@ -1150,7 +1151,7 @@ asmlinkage void do_mt(struct pt_regs *regs) | |||
1150 | asmlinkage void do_dsp(struct pt_regs *regs) | 1151 | asmlinkage void do_dsp(struct pt_regs *regs) |
1151 | { | 1152 | { |
1152 | if (cpu_has_dsp) | 1153 | if (cpu_has_dsp) |
1153 | panic("Unexpected DSP exception\n"); | 1154 | panic("Unexpected DSP exception"); |
1154 | 1155 | ||
1155 | force_sig(SIGILL, current); | 1156 | force_sig(SIGILL, current); |
1156 | } | 1157 | } |
@@ -1339,9 +1340,18 @@ void ejtag_exception_handler(struct pt_regs *regs) | |||
1339 | 1340 | ||
1340 | /* | 1341 | /* |
1341 | * NMI exception handler. | 1342 | * NMI exception handler. |
1343 | * No lock; only written during early bootup by CPU 0. | ||
1342 | */ | 1344 | */ |
1345 | static RAW_NOTIFIER_HEAD(nmi_chain); | ||
1346 | |||
1347 | int register_nmi_notifier(struct notifier_block *nb) | ||
1348 | { | ||
1349 | return raw_notifier_chain_register(&nmi_chain, nb); | ||
1350 | } | ||
1351 | |||
1343 | void __noreturn nmi_exception_handler(struct pt_regs *regs) | 1352 | void __noreturn nmi_exception_handler(struct pt_regs *regs) |
1344 | { | 1353 | { |
1354 | raw_notifier_call_chain(&nmi_chain, 0, regs); | ||
1345 | bust_spinlocks(1); | 1355 | bust_spinlocks(1); |
1346 | printk("NMI taken!!!!\n"); | 1356 | printk("NMI taken!!!!\n"); |
1347 | die("NMI", regs); | 1357 | die("NMI", regs); |
@@ -1682,6 +1692,8 @@ void __init trap_init(void) | |||
1682 | ebase += (read_c0_ebase() & 0x3ffff000); | 1692 | ebase += (read_c0_ebase() & 0x3ffff000); |
1683 | } | 1693 | } |
1684 | 1694 | ||
1695 | if (board_ebase_setup) | ||
1696 | board_ebase_setup(); | ||
1685 | per_cpu_trap_init(); | 1697 | per_cpu_trap_init(); |
1686 | 1698 | ||
1687 | /* | 1699 | /* |