diff options
Diffstat (limited to 'arch/x86/include/asm/nmi.h')
| -rw-r--r-- | arch/x86/include/asm/nmi.h | 22 | 
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index fd3f9f18cf3..0e3793b821e 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h @@ -27,6 +27,8 @@ void arch_trigger_all_cpu_backtrace(void);  enum {  	NMI_LOCAL=0,  	NMI_UNKNOWN, +	NMI_SERR, +	NMI_IO_CHECK,  	NMI_MAX  }; @@ -35,8 +37,24 @@ enum {  typedef int (*nmi_handler_t)(unsigned int, struct pt_regs *); -int register_nmi_handler(unsigned int, nmi_handler_t, unsigned long, -			 const char *); +struct nmiaction { +	struct list_head	list; +	nmi_handler_t		handler; +	unsigned long		flags; +	const char		*name; +}; + +#define register_nmi_handler(t, fn, fg, n)		\ +({							\ +	static struct nmiaction fn##_na = {		\ +		.handler = (fn),			\ +		.name = (n),				\ +		.flags = (fg),				\ +	};						\ +	__register_nmi_handler((t), &fn##_na);	\ +}) + +int __register_nmi_handler(unsigned int, struct nmiaction *);  void unregister_nmi_handler(unsigned int, const char *);  |