diff options
Diffstat (limited to 'arch/sh/kernel/traps.c')
-rw-r--r-- | arch/sh/kernel/traps.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index f69bd968fcca..a8396f36bd14 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -5,6 +5,7 @@ #include <linux/signal.h> #include <linux/sched.h> #include <linux/uaccess.h> +#include <linux/hardirq.h> #include <asm/unwinder.h> #include <asm/system.h> @@ -91,3 +92,23 @@ BUILD_TRAP_HANDLER(bug) force_sig(SIGTRAP, current); } + +BUILD_TRAP_HANDLER(nmi) +{ + TRAP_HANDLER_DECL; + + nmi_enter(); + + switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { + case NOTIFY_OK: + case NOTIFY_STOP: + break; + case NOTIFY_BAD: + die("Fatal Non-Maskable Interrupt", regs, SIGINT); + default: + printk(KERN_ALERT "Got NMI, but nobody cared. Ignoring...\n"); + break; + } + + nmi_exit(); +} |