diff options
author | Andi Kleen <ak@suse.de> | 2006-09-29 19:47:55 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-29 19:47:55 -0400 |
commit | 29cbc78b90a73ad80f2f58ba2927956cf663abed (patch) | |
tree | e72fdb9c1c055da47b4cd8834bc944af8efc1ed8 | |
parent | 013bf2c50ed943e9c23a2145d3ea7c4d88cda310 (diff) |
[PATCH] x86: Clean up x86 NMI sysctls
Use prototypes in headers
Don't define panic_on_unrecovered_nmi for all architectures
Cc: dzickus@redhat.com
Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r-- | arch/i386/kernel/nmi.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 4 | ||||
-rw-r--r-- | include/asm-i386/nmi.h | 6 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 7 | ||||
-rw-r--r-- | kernel/panic.c | 1 | ||||
-rw-r--r-- | kernel/sysctl.c | 11 |
7 files changed, 26 insertions, 8 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index dbda706fdd14..0fc4997fb143 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -31,6 +31,9 @@ | |||
31 | 31 | ||
32 | #include "mach_traps.h" | 32 | #include "mach_traps.h" |
33 | 33 | ||
34 | int unknown_nmi_panic; | ||
35 | int nmi_watchdog_enabled; | ||
36 | |||
34 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: | 37 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: |
35 | * evtsel_nmi_owner tracks the ownership of the event selection | 38 | * evtsel_nmi_owner tracks the ownership of the event selection |
36 | * - different performance counters/ event selection may be reserved for | 39 | * - different performance counters/ event selection may be reserved for |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index a13037fe0ee3..6820b8d643c7 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -57,6 +57,8 @@ | |||
57 | 57 | ||
58 | #include "mach_traps.h" | 58 | #include "mach_traps.h" |
59 | 59 | ||
60 | int panic_on_unrecovered_nmi; | ||
61 | |||
60 | asmlinkage int system_call(void); | 62 | asmlinkage int system_call(void); |
61 | 63 | ||
62 | struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, | 64 | struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 4d6fb047952e..7af9cb3e2d99 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -28,6 +28,10 @@ | |||
28 | #include <asm/mce.h> | 28 | #include <asm/mce.h> |
29 | #include <asm/intel_arch_perfmon.h> | 29 | #include <asm/intel_arch_perfmon.h> |
30 | 30 | ||
31 | int unknown_nmi_panic; | ||
32 | int nmi_watchdog_enabled; | ||
33 | int panic_on_unrecovered_nmi; | ||
34 | |||
31 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: | 35 | /* perfctr_nmi_owner tracks the ownership of the perfctr registers: |
32 | * evtsel_nmi_owner tracks the ownership of the event selection | 36 | * evtsel_nmi_owner tracks the ownership of the event selection |
33 | * - different performance counters/ event selection may be reserved for | 37 | * - different performance counters/ event selection may be reserved for |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 303bcd4592bb..269d315719ca 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -36,4 +36,10 @@ extern unsigned int nmi_watchdog; | |||
36 | #define NMI_LOCAL_APIC 2 | 36 | #define NMI_LOCAL_APIC 2 |
37 | #define NMI_INVALID 3 | 37 | #define NMI_INVALID 3 |
38 | 38 | ||
39 | struct ctl_table; | ||
40 | struct file; | ||
41 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
42 | void __user *, size_t *, loff_t *); | ||
43 | extern int unknown_nmi_panic; | ||
44 | |||
39 | #endif /* ASM_NMI_H */ | 45 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index cbf2669bca71..f367d4014b42 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -70,4 +70,11 @@ extern unsigned int nmi_watchdog; | |||
70 | #define NMI_LOCAL_APIC 2 | 70 | #define NMI_LOCAL_APIC 2 |
71 | #define NMI_INVALID 3 | 71 | #define NMI_INVALID 3 |
72 | 72 | ||
73 | struct ctl_table; | ||
74 | struct file; | ||
75 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
76 | void __user *, size_t *, loff_t *); | ||
77 | |||
78 | extern int unknown_nmi_panic; | ||
79 | |||
73 | #endif /* ASM_NMI_H */ | 80 | #endif /* ASM_NMI_H */ |
diff --git a/kernel/panic.c b/kernel/panic.c index 6ceb664fb52a..525e365f7239 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/debug_locks.h> | 21 | #include <linux/debug_locks.h> |
22 | 22 | ||
23 | int panic_on_oops; | 23 | int panic_on_oops; |
24 | int panic_on_unrecovered_nmi; | ||
25 | int tainted; | 24 | int tainted; |
26 | static int pause_on_oops; | 25 | static int pause_on_oops; |
27 | static int pause_on_oops_flag; | 26 | static int pause_on_oops_flag; |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 9535a3839930..c57c4532e296 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -52,6 +52,10 @@ | |||
52 | extern int proc_nr_files(ctl_table *table, int write, struct file *filp, | 52 | extern int proc_nr_files(ctl_table *table, int write, struct file *filp, |
53 | void __user *buffer, size_t *lenp, loff_t *ppos); | 53 | void __user *buffer, size_t *lenp, loff_t *ppos); |
54 | 54 | ||
55 | #ifdef CONFIG_X86 | ||
56 | #include <asm/nmi.h> | ||
57 | #endif | ||
58 | |||
55 | #if defined(CONFIG_SYSCTL) | 59 | #if defined(CONFIG_SYSCTL) |
56 | 60 | ||
57 | /* External variables not in a header file. */ | 61 | /* External variables not in a header file. */ |
@@ -74,13 +78,6 @@ extern int sysctl_drop_caches; | |||
74 | extern int percpu_pagelist_fraction; | 78 | extern int percpu_pagelist_fraction; |
75 | extern int compat_log; | 79 | extern int compat_log; |
76 | 80 | ||
77 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) | ||
78 | int unknown_nmi_panic; | ||
79 | int nmi_watchdog_enabled; | ||
80 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
81 | void __user *, size_t *, loff_t *); | ||
82 | #endif | ||
83 | |||
84 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ | 81 | /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ |
85 | static int maxolduid = 65535; | 82 | static int maxolduid = 65535; |
86 | static int minolduid; | 83 | static int minolduid; |