diff options
author | Don Zickus <dzickus@redhat.com> | 2006-06-26 07:57:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:16 -0400 |
commit | 3e4ff115740c28dea463561aa1405a3c0de0d2d0 (patch) | |
tree | 517e293240ae7f2ccb6b4545a6d9a22660e46f02 | |
parent | 14118c3cdd46d72e503ee2f727b11d881f72f755 (diff) |
[PATCH] x86_64: nmi watchdog header cleanup
Misc header cleanup for nmi watchdog.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/apic.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/nmi.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 1 | ||||
-rw-r--r-- | arch/i386/oprofile/op_model_athlon.c | 1 | ||||
-rw-r--r-- | arch/i386/oprofile/op_model_p4.c | 1 | ||||
-rw-r--r-- | arch/i386/oprofile/op_model_ppro.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 8 | ||||
-rw-r--r-- | include/asm-i386/apic.h | 12 | ||||
-rw-r--r-- | include/asm-i386/nmi.h | 28 | ||||
-rw-r--r-- | include/asm-x86_64/apic.h | 16 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 30 |
13 files changed, 53 insertions, 55 deletions
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 5ab59c12335b..5f197e197c55 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/arch_hooks.h> | 36 | #include <asm/arch_hooks.h> |
37 | #include <asm/hpet.h> | 37 | #include <asm/hpet.h> |
38 | #include <asm/i8253.h> | 38 | #include <asm/i8253.h> |
39 | #include <asm/nmi.h> | ||
39 | 40 | ||
40 | #include <mach_apic.h> | 41 | #include <mach_apic.h> |
41 | #include <mach_apicdef.h> | 42 | #include <mach_apicdef.h> |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 5a1a5412015c..61317f4be444 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/desc.h> | 38 | #include <asm/desc.h> |
39 | #include <asm/timer.h> | 39 | #include <asm/timer.h> |
40 | #include <asm/i8259.h> | 40 | #include <asm/i8259.h> |
41 | #include <asm/nmi.h> | ||
41 | 42 | ||
42 | #include <mach_apic.h> | 43 | #include <mach_apic.h> |
43 | 44 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index d43b498ec745..bd3875419630 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -14,20 +14,15 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/mm.h> | ||
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/bootmem.h> | ||
20 | #include <linux/smp_lock.h> | ||
21 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
22 | #include <linux/mc146818rtc.h> | ||
23 | #include <linux/kernel_stat.h> | ||
24 | #include <linux/module.h> | 19 | #include <linux/module.h> |
25 | #include <linux/nmi.h> | 20 | #include <linux/nmi.h> |
26 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
27 | #include <linux/sysctl.h> | 22 | #include <linux/sysctl.h> |
23 | #include <linux/percpu.h> | ||
28 | 24 | ||
29 | #include <asm/smp.h> | 25 | #include <asm/smp.h> |
30 | #include <asm/div64.h> | ||
31 | #include <asm/nmi.h> | 26 | #include <asm/nmi.h> |
32 | 27 | ||
33 | #include "mach_traps.h" | 28 | #include "mach_traps.h" |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index bd0ca5c9f053..bce5470ecb42 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/tlbflush.h> | 52 | #include <asm/tlbflush.h> |
53 | #include <asm/desc.h> | 53 | #include <asm/desc.h> |
54 | #include <asm/arch_hooks.h> | 54 | #include <asm/arch_hooks.h> |
55 | #include <asm/nmi.h> | ||
55 | 56 | ||
56 | #include <mach_apic.h> | 57 | #include <mach_apic.h> |
57 | #include <mach_wakecpu.h> | 58 | #include <mach_wakecpu.h> |
diff --git a/arch/i386/oprofile/op_model_athlon.c b/arch/i386/oprofile/op_model_athlon.c index 3ad9a72a5036..693bdea4a52b 100644 --- a/arch/i386/oprofile/op_model_athlon.c +++ b/arch/i386/oprofile/op_model_athlon.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/oprofile.h> | 13 | #include <linux/oprofile.h> |
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/msr.h> | 15 | #include <asm/msr.h> |
16 | #include <asm/nmi.h> | ||
16 | 17 | ||
17 | #include "op_x86_model.h" | 18 | #include "op_x86_model.h" |
18 | #include "op_counter.h" | 19 | #include "op_counter.h" |
diff --git a/arch/i386/oprofile/op_model_p4.c b/arch/i386/oprofile/op_model_p4.c index ac8a066035c2..7c61d357b82b 100644 --- a/arch/i386/oprofile/op_model_p4.c +++ b/arch/i386/oprofile/op_model_p4.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/fixmap.h> | 15 | #include <asm/fixmap.h> |
16 | #include <asm/apic.h> | 16 | #include <asm/apic.h> |
17 | #include <asm/nmi.h> | ||
17 | 18 | ||
18 | #include "op_x86_model.h" | 19 | #include "op_x86_model.h" |
19 | #include "op_counter.h" | 20 | #include "op_counter.h" |
diff --git a/arch/i386/oprofile/op_model_ppro.c b/arch/i386/oprofile/op_model_ppro.c index d719015fc044..5c3ab4b027ad 100644 --- a/arch/i386/oprofile/op_model_ppro.c +++ b/arch/i386/oprofile/op_model_ppro.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/msr.h> | 15 | #include <asm/msr.h> |
16 | #include <asm/apic.h> | 16 | #include <asm/apic.h> |
17 | #include <asm/nmi.h> | ||
17 | 18 | ||
18 | #include "op_x86_model.h" | 19 | #include "op_x86_model.h" |
19 | #include "op_counter.h" | 20 | #include "op_counter.h" |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 15b2f6932de1..38a3ff30bde1 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/mach_apic.h> | 41 | #include <asm/mach_apic.h> |
42 | #include <asm/acpi.h> | 42 | #include <asm/acpi.h> |
43 | #include <asm/dma.h> | 43 | #include <asm/dma.h> |
44 | #include <asm/nmi.h> | ||
44 | 45 | ||
45 | #define __apicdebuginit __init | 46 | #define __apicdebuginit __init |
46 | 47 | ||
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 4e6357fe0ec3..ab421e22fa67 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -15,11 +15,7 @@ | |||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/bootmem.h> | ||
19 | #include <linux/smp_lock.h> | ||
20 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
21 | #include <linux/mc146818rtc.h> | ||
22 | #include <linux/kernel_stat.h> | ||
23 | #include <linux/module.h> | 19 | #include <linux/module.h> |
24 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
25 | #include <linux/nmi.h> | 21 | #include <linux/nmi.h> |
@@ -27,13 +23,9 @@ | |||
27 | #include <linux/kprobes.h> | 23 | #include <linux/kprobes.h> |
28 | 24 | ||
29 | #include <asm/smp.h> | 25 | #include <asm/smp.h> |
30 | #include <asm/mtrr.h> | ||
31 | #include <asm/mpspec.h> | ||
32 | #include <asm/nmi.h> | 26 | #include <asm/nmi.h> |
33 | #include <asm/msr.h> | ||
34 | #include <asm/proto.h> | 27 | #include <asm/proto.h> |
35 | #include <asm/kdebug.h> | 28 | #include <asm/kdebug.h> |
36 | #include <asm/local.h> | ||
37 | #include <asm/mce.h> | 29 | #include <asm/mce.h> |
38 | 30 | ||
39 | /* | 31 | /* |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 1d8362cb2c5d..2c1e371cebb6 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -111,24 +111,12 @@ extern void init_apic_mappings (void); | |||
111 | extern void smp_local_timer_interrupt (struct pt_regs * regs); | 111 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
112 | extern void setup_boot_APIC_clock (void); | 112 | extern void setup_boot_APIC_clock (void); |
113 | extern void setup_secondary_APIC_clock (void); | 113 | extern void setup_secondary_APIC_clock (void); |
114 | extern void setup_apic_nmi_watchdog (void); | ||
115 | extern int reserve_lapic_nmi(void); | ||
116 | extern void release_lapic_nmi(void); | ||
117 | extern void disable_timer_nmi_watchdog(void); | ||
118 | extern void enable_timer_nmi_watchdog(void); | ||
119 | extern void nmi_watchdog_tick (struct pt_regs * regs); | ||
120 | extern int APIC_init_uniprocessor (void); | 114 | extern int APIC_init_uniprocessor (void); |
121 | extern void disable_APIC_timer(void); | 115 | extern void disable_APIC_timer(void); |
122 | extern void enable_APIC_timer(void); | 116 | extern void enable_APIC_timer(void); |
123 | 117 | ||
124 | extern void enable_NMI_through_LVT0 (void * dummy); | 118 | extern void enable_NMI_through_LVT0 (void * dummy); |
125 | 119 | ||
126 | extern unsigned int nmi_watchdog; | ||
127 | #define NMI_NONE 0 | ||
128 | #define NMI_IO_APIC 1 | ||
129 | #define NMI_LOCAL_APIC 2 | ||
130 | #define NMI_INVALID 3 | ||
131 | |||
132 | extern int disable_timer_pin_1; | 120 | extern int disable_timer_pin_1; |
133 | 121 | ||
134 | void smp_send_timer_broadcast_ipi(struct pt_regs *regs); | 122 | void smp_send_timer_broadcast_ipi(struct pt_regs *regs); |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 21f16638fc61..67d994799999 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -5,24 +5,38 @@ | |||
5 | #define ASM_NMI_H | 5 | #define ASM_NMI_H |
6 | 6 | ||
7 | #include <linux/pm.h> | 7 | #include <linux/pm.h> |
8 | 8 | ||
9 | struct pt_regs; | 9 | struct pt_regs; |
10 | 10 | ||
11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); | 11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * set_nmi_callback | 14 | * set_nmi_callback |
15 | * | 15 | * |
16 | * Set a handler for an NMI. Only one handler may be | 16 | * Set a handler for an NMI. Only one handler may be |
17 | * set. Return 1 if the NMI was handled. | 17 | * set. Return 1 if the NMI was handled. |
18 | */ | 18 | */ |
19 | void set_nmi_callback(nmi_callback_t callback); | 19 | void set_nmi_callback(nmi_callback_t callback); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * unset_nmi_callback | 22 | * unset_nmi_callback |
23 | * | 23 | * |
24 | * Remove the handler previously set. | 24 | * Remove the handler previously set. |
25 | */ | 25 | */ |
26 | void unset_nmi_callback(void); | 26 | void unset_nmi_callback(void); |
27 | 27 | ||
28 | extern void setup_apic_nmi_watchdog (void); | ||
29 | extern int reserve_lapic_nmi(void); | ||
30 | extern void release_lapic_nmi(void); | ||
31 | extern void disable_timer_nmi_watchdog(void); | ||
32 | extern void enable_timer_nmi_watchdog(void); | ||
33 | extern void nmi_watchdog_tick (struct pt_regs * regs); | ||
34 | |||
35 | extern unsigned int nmi_watchdog; | ||
36 | #define NMI_DEFAULT -1 | ||
37 | #define NMI_NONE 0 | ||
38 | #define NMI_IO_APIC 1 | ||
39 | #define NMI_LOCAL_APIC 2 | ||
40 | #define NMI_INVALID 3 | ||
41 | |||
28 | #endif /* ASM_NMI_H */ | 42 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index a731be2204d2..c9e6c2501a48 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -79,27 +79,11 @@ extern void init_apic_mappings (void); | |||
79 | extern void smp_local_timer_interrupt (struct pt_regs * regs); | 79 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
80 | extern void setup_boot_APIC_clock (void); | 80 | extern void setup_boot_APIC_clock (void); |
81 | extern void setup_secondary_APIC_clock (void); | 81 | extern void setup_secondary_APIC_clock (void); |
82 | extern void setup_apic_nmi_watchdog (void); | ||
83 | extern int reserve_lapic_nmi(void); | ||
84 | extern void release_lapic_nmi(void); | ||
85 | extern void disable_timer_nmi_watchdog(void); | ||
86 | extern void enable_timer_nmi_watchdog(void); | ||
87 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
88 | extern int APIC_init_uniprocessor (void); | 82 | extern int APIC_init_uniprocessor (void); |
89 | extern void disable_APIC_timer(void); | 83 | extern void disable_APIC_timer(void); |
90 | extern void enable_APIC_timer(void); | 84 | extern void enable_APIC_timer(void); |
91 | extern void clustered_apic_check(void); | 85 | extern void clustered_apic_check(void); |
92 | 86 | ||
93 | extern void nmi_watchdog_default(void); | ||
94 | extern int setup_nmi_watchdog(char *); | ||
95 | |||
96 | extern unsigned int nmi_watchdog; | ||
97 | #define NMI_DEFAULT -1 | ||
98 | #define NMI_NONE 0 | ||
99 | #define NMI_IO_APIC 1 | ||
100 | #define NMI_LOCAL_APIC 2 | ||
101 | #define NMI_INVALID 3 | ||
102 | |||
103 | extern int disable_timer_pin_1; | 87 | extern int disable_timer_pin_1; |
104 | 88 | ||
105 | extern void setup_threshold_lvt(unsigned long lvt_off); | 89 | extern void setup_threshold_lvt(unsigned long lvt_off); |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index d3abfc6a8fd5..efb45c894d76 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -5,26 +5,27 @@ | |||
5 | #define ASM_NMI_H | 5 | #define ASM_NMI_H |
6 | 6 | ||
7 | #include <linux/pm.h> | 7 | #include <linux/pm.h> |
8 | #include <asm/io.h> | ||
8 | 9 | ||
9 | struct pt_regs; | 10 | struct pt_regs; |
10 | 11 | ||
11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); | 12 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | 13 | ||
13 | /** | 14 | /** |
14 | * set_nmi_callback | 15 | * set_nmi_callback |
15 | * | 16 | * |
16 | * Set a handler for an NMI. Only one handler may be | 17 | * Set a handler for an NMI. Only one handler may be |
17 | * set. Return 1 if the NMI was handled. | 18 | * set. Return 1 if the NMI was handled. |
18 | */ | 19 | */ |
19 | void set_nmi_callback(nmi_callback_t callback); | 20 | void set_nmi_callback(nmi_callback_t callback); |
20 | 21 | ||
21 | /** | 22 | /** |
22 | * unset_nmi_callback | 23 | * unset_nmi_callback |
23 | * | 24 | * |
24 | * Remove the handler previously set. | 25 | * Remove the handler previously set. |
25 | */ | 26 | */ |
26 | void unset_nmi_callback(void); | 27 | void unset_nmi_callback(void); |
27 | 28 | ||
28 | #ifdef CONFIG_PM | 29 | #ifdef CONFIG_PM |
29 | 30 | ||
30 | /** Replace the PM callback routine for NMI. */ | 31 | /** Replace the PM callback routine for NMI. */ |
@@ -56,4 +57,21 @@ extern int unknown_nmi_panic; | |||
56 | 57 | ||
57 | extern int check_nmi_watchdog(void); | 58 | extern int check_nmi_watchdog(void); |
58 | 59 | ||
60 | extern void setup_apic_nmi_watchdog (void); | ||
61 | extern int reserve_lapic_nmi(void); | ||
62 | extern void release_lapic_nmi(void); | ||
63 | extern void disable_timer_nmi_watchdog(void); | ||
64 | extern void enable_timer_nmi_watchdog(void); | ||
65 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
66 | |||
67 | extern void nmi_watchdog_default(void); | ||
68 | extern int setup_nmi_watchdog(char *); | ||
69 | |||
70 | extern unsigned int nmi_watchdog; | ||
71 | #define NMI_DEFAULT -1 | ||
72 | #define NMI_NONE 0 | ||
73 | #define NMI_IO_APIC 1 | ||
74 | #define NMI_LOCAL_APIC 2 | ||
75 | #define NMI_INVALID 3 | ||
76 | |||
59 | #endif /* ASM_NMI_H */ | 77 | #endif /* ASM_NMI_H */ |