aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/kernel/traps.c')
-rw-r--r--arch/avr32/kernel/traps.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c
index 870c075e6314..cf6f686d9b0b 100644
--- a/arch/avr32/kernel/traps.c
+++ b/arch/avr32/kernel/traps.c
@@ -9,6 +9,7 @@
9#include <linux/bug.h> 9#include <linux/bug.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/kallsyms.h> 11#include <linux/kallsyms.h>
12#include <linux/kdebug.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/notifier.h> 14#include <linux/notifier.h>
14#include <linux/sched.h> 15#include <linux/sched.h>
@@ -107,9 +108,23 @@ void _exception(long signr, struct pt_regs *regs, int code,
107 108
108asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) 109asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs)
109{ 110{
110 printk(KERN_ALERT "Got Non-Maskable Interrupt, dumping regs\n"); 111 int ret;
111 show_regs_log_lvl(regs, KERN_ALERT); 112
112 show_stack_log_lvl(current, regs->sp, regs, KERN_ALERT); 113 nmi_enter();
114
115 ret = notify_die(DIE_NMI, "NMI", regs, 0, ecr, SIGINT);
116 switch (ret) {
117 case NOTIFY_OK:
118 case NOTIFY_STOP:
119 return;
120 case NOTIFY_BAD:
121 die("Fatal Non-Maskable Interrupt", regs, SIGINT);
122 default:
123 break;
124 }
125
126 printk(KERN_ALERT "Got NMI, but nobody cared. Disabling...\n");
127 nmi_disable();
113} 128}
114 129
115asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs) 130asmlinkage void do_critical_exception(unsigned long ecr, struct pt_regs *regs)