diff options
Diffstat (limited to 'arch/x86/include/asm/nmi.h')
| -rw-r--r-- | arch/x86/include/asm/nmi.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index 0e3793b821ef..dc580c42851c 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h | |||
| @@ -54,6 +54,20 @@ struct nmiaction { | |||
| 54 | __register_nmi_handler((t), &fn##_na); \ | 54 | __register_nmi_handler((t), &fn##_na); \ |
| 55 | }) | 55 | }) |
| 56 | 56 | ||
| 57 | /* | ||
| 58 | * For special handlers that register/unregister in the | ||
| 59 | * init section only. This should be considered rare. | ||
| 60 | */ | ||
| 61 | #define register_nmi_handler_initonly(t, fn, fg, n) \ | ||
| 62 | ({ \ | ||
| 63 | static struct nmiaction fn##_na __initdata = { \ | ||
| 64 | .handler = (fn), \ | ||
| 65 | .name = (n), \ | ||
| 66 | .flags = (fg), \ | ||
| 67 | }; \ | ||
| 68 | __register_nmi_handler((t), &fn##_na); \ | ||
| 69 | }) | ||
| 70 | |||
| 57 | int __register_nmi_handler(unsigned int, struct nmiaction *); | 71 | int __register_nmi_handler(unsigned int, struct nmiaction *); |
| 58 | 72 | ||
| 59 | void unregister_nmi_handler(unsigned int, const char *); | 73 | void unregister_nmi_handler(unsigned int, const char *); |
