diff options
author | Don Zickus <dzickus@redhat.com> | 2010-02-12 17:19:19 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-14 03:19:43 -0500 |
commit | 504d7cf10ee42bb76b9556859f23d4121dee0a77 (patch) | |
tree | edaa43a7c221f0926d150dbbeb38abc5fe0f1cc6 /kernel/sysctl.c | |
parent | c3128fb6ad39b0edda6675d20585a64846cf89ea (diff) |
nmi_watchdog: Compile and portability fixes
The original patch was x86_64 centric. Changed the code to make
it less so.
ested by building and running on a powerpc.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: gorcunov@gmail.com
Cc: aris@redhat.com
LKML-Reference: <1266013161-31197-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a68b2448468..ac72c9e6bd9b 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -60,6 +60,10 @@ | |||
60 | #include <asm/io.h> | 60 | #include <asm/io.h> |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #ifdef CONFIG_NMI_WATCHDOG | ||
64 | #include <linux/nmi.h> | ||
65 | #endif | ||
66 | |||
63 | 67 | ||
64 | #if defined(CONFIG_SYSCTL) | 68 | #if defined(CONFIG_SYSCTL) |
65 | 69 | ||
@@ -692,7 +696,16 @@ static struct ctl_table kern_table[] = { | |||
692 | .mode = 0444, | 696 | .mode = 0444, |
693 | .proc_handler = proc_dointvec, | 697 | .proc_handler = proc_dointvec, |
694 | }, | 698 | }, |
695 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | 699 | #if defined(CONFIG_NMI_WATCHDOG) |
700 | { | ||
701 | .procname = "nmi_watchdog", | ||
702 | .data = &nmi_watchdog_enabled, | ||
703 | .maxlen = sizeof (int), | ||
704 | .mode = 0644, | ||
705 | .proc_handler = proc_nmi_enabled, | ||
706 | }, | ||
707 | #endif | ||
708 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_NMI_WATCHDOG) | ||
696 | { | 709 | { |
697 | .procname = "unknown_nmi_panic", | 710 | .procname = "unknown_nmi_panic", |
698 | .data = &unknown_nmi_panic, | 711 | .data = &unknown_nmi_panic, |