aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c16
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);
91void (*board_nmi_handler_setup)(void); 91void (*board_nmi_handler_setup)(void);
92void (*board_ejtag_handler_setup)(void); 92void (*board_ejtag_handler_setup)(void);
93void (*board_bind_eic_interrupt)(int irq, int regset); 93void (*board_bind_eic_interrupt)(int irq, int regset);
94void (*board_ebase_setup)(void);
94 95
95 96
96static void show_raw_backtrace(unsigned long reg29) 97static 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)
1150asmlinkage void do_dsp(struct pt_regs *regs) 1151asmlinkage 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 */
1345static RAW_NOTIFIER_HEAD(nmi_chain);
1346
1347int register_nmi_notifier(struct notifier_block *nb)
1348{
1349 return raw_notifier_chain_register(&nmi_chain, nb);
1350}
1351
1343void __noreturn nmi_exception_handler(struct pt_regs *regs) 1352void __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 /*