summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/traps.h
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2011-11-16 05:25:44 +0400
committerRalf Baechle <ralf@linux-mips.org>2011-12-08 02:03:18 +0400
commit34bd92e27becdc2c8b50d200a329da5e9b8174d9 (patch)
tree80379235839035261bbdc239dc517beeeadba2f1 /arch/mips/include/asm/traps.h
parent18a1eef92dcd6b8ec30fcbe6e074e5d33ef31c02 (diff)
downloadlinux-34bd92e27becdc2c8b50d200a329da5e9b8174d9.tar.xz
MIPS: Add NMI notifier
Allow the board support code to register a raw notifier callback for NMI, similar to what is done for CU2 exceptions. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2958/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/traps.h')
-rw-r--r--arch/mips/include/asm/traps.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/include/asm/traps.h b/arch/mips/include/asm/traps.h
index 90ff2f497c50..4edab87eebd2 100644
--- a/arch/mips/include/asm/traps.h
+++ b/arch/mips/include/asm/traps.h
@@ -25,4 +25,16 @@ extern void (*board_nmi_handler_setup)(void);
extern void (*board_ejtag_handler_setup)(void);
extern void (*board_bind_eic_interrupt)(int irq, int regset);
+extern int register_nmi_notifier(struct notifier_block *nb);
+
+#define nmi_notifier(fn, pri) \
+({ \
+ static struct notifier_block fn##_nb = { \
+ .notifier_call = fn, \
+ .priority = pri \
+ }; \
+ \
+ register_nmi_notifier(&fn##_nb); \
+})
+
#endif /* _ASM_TRAPS_H */