diff options
author | Li Zhong <zhong@linux.vnet.ibm.com> | 2012-06-18 15:56:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-06-20 14:23:17 +0200 |
commit | 0718467c859f5571dc48d294596f841096f6a47a (patch) | |
tree | de7aa9bbfdfe476ea48dd6ba57691765e8941b00 /arch/x86/include | |
parent | 6a991acceedce3ca93caef8ba7af2468c9451614 (diff) | |
download | linux-0718467c859f5571dc48d294596f841096f6a47a.tar.gz linux-0718467c859f5571dc48d294596f841096f6a47a.tar.bz2 linux-0718467c859f5571dc48d294596f841096f6a47a.zip |
x86/nmi: Clean up register_nmi_handler() usage
Implement a cleaner and easier to maintain version for the section
warning fixes implemented in commit eeaaa96a3a21
("x86/nmi: Fix section mismatch warnings on 32-bit").
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Jan Beulich <JBeulich@suse.com>
Link: http://lkml.kernel.org/r/1340049393-17771-1-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/nmi.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index dc580c42851c..c0fa356e90de 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h @@ -44,28 +44,14 @@ struct nmiaction { const char *name; }; -#define register_nmi_handler(t, fn, fg, n) \ +#define register_nmi_handler(t, fn, fg, n, init...) \ ({ \ - static struct nmiaction fn##_na = { \ + static struct nmiaction init fn##_na = { \ .handler = (fn), \ .name = (n), \ .flags = (fg), \ }; \ - __register_nmi_handler((t), &fn##_na); \ -}) - -/* - * For special handlers that register/unregister in the - * init section only. This should be considered rare. - */ -#define register_nmi_handler_initonly(t, fn, fg, n) \ -({ \ - static struct nmiaction fn##_na __initdata = { \ - .handler = (fn), \ - .name = (n), \ - .flags = (fg), \ - }; \ - __register_nmi_handler((t), &fn##_na); \ + __register_nmi_handler((t), &fn##_na); \ }) int __register_nmi_handler(unsigned int, struct nmiaction *); |