Commit 3e4ff115740c28dea463561aa1405a3c0de0d2d0
Committed by
Linus Torvalds
1 parent
14118c3cdd
[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>
Showing 13 changed files with 53 additions and 55 deletions Side-by-side Diff
- arch/i386/kernel/apic.c
- arch/i386/kernel/io_apic.c
- arch/i386/kernel/nmi.c
- arch/i386/kernel/smpboot.c
- arch/i386/oprofile/op_model_athlon.c
- arch/i386/oprofile/op_model_p4.c
- arch/i386/oprofile/op_model_ppro.c
- arch/x86_64/kernel/io_apic.c
- arch/x86_64/kernel/nmi.c
- include/asm-i386/apic.h
- include/asm-i386/nmi.h
- include/asm-x86_64/apic.h
- include/asm-x86_64/nmi.h
arch/i386/kernel/apic.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/nmi.c
... | ... | @@ -14,20 +14,15 @@ |
14 | 14 | */ |
15 | 15 | |
16 | 16 | #include <linux/config.h> |
17 | -#include <linux/mm.h> | |
18 | 17 | #include <linux/delay.h> |
19 | -#include <linux/bootmem.h> | |
20 | -#include <linux/smp_lock.h> | |
21 | 18 | #include <linux/interrupt.h> |
22 | -#include <linux/mc146818rtc.h> | |
23 | -#include <linux/kernel_stat.h> | |
24 | 19 | #include <linux/module.h> |
25 | 20 | #include <linux/nmi.h> |
26 | 21 | #include <linux/sysdev.h> |
27 | 22 | #include <linux/sysctl.h> |
23 | +#include <linux/percpu.h> | |
28 | 24 | |
29 | 25 | #include <asm/smp.h> |
30 | -#include <asm/div64.h> | |
31 | 26 | #include <asm/nmi.h> |
32 | 27 | |
33 | 28 | #include "mach_traps.h" |
arch/i386/kernel/smpboot.c
arch/i386/oprofile/op_model_athlon.c
arch/i386/oprofile/op_model_p4.c
arch/i386/oprofile/op_model_ppro.c
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/nmi.c
... | ... | @@ -15,11 +15,7 @@ |
15 | 15 | #include <linux/config.h> |
16 | 16 | #include <linux/mm.h> |
17 | 17 | #include <linux/delay.h> |
18 | -#include <linux/bootmem.h> | |
19 | -#include <linux/smp_lock.h> | |
20 | 18 | #include <linux/interrupt.h> |
21 | -#include <linux/mc146818rtc.h> | |
22 | -#include <linux/kernel_stat.h> | |
23 | 19 | #include <linux/module.h> |
24 | 20 | #include <linux/sysdev.h> |
25 | 21 | #include <linux/nmi.h> |
26 | 22 | |
27 | 23 | |
... | ... | @@ -27,13 +23,9 @@ |
27 | 23 | #include <linux/kprobes.h> |
28 | 24 | |
29 | 25 | #include <asm/smp.h> |
30 | -#include <asm/mtrr.h> | |
31 | -#include <asm/mpspec.h> | |
32 | 26 | #include <asm/nmi.h> |
33 | -#include <asm/msr.h> | |
34 | 27 | #include <asm/proto.h> |
35 | 28 | #include <asm/kdebug.h> |
36 | -#include <asm/local.h> | |
37 | 29 | #include <asm/mce.h> |
38 | 30 | |
39 | 31 | /* |
include/asm-i386/apic.h
... | ... | @@ -111,23 +111,11 @@ |
111 | 111 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
112 | 112 | extern void setup_boot_APIC_clock (void); |
113 | 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 | 114 | extern int APIC_init_uniprocessor (void); |
121 | 115 | extern void disable_APIC_timer(void); |
122 | 116 | extern void enable_APIC_timer(void); |
123 | 117 | |
124 | 118 | extern void enable_NMI_through_LVT0 (void * dummy); |
125 | - | |
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 | 119 | |
132 | 120 | extern int disable_timer_pin_1; |
133 | 121 |
include/asm-i386/nmi.h
... | ... | @@ -5,25 +5,39 @@ |
5 | 5 | #define ASM_NMI_H |
6 | 6 | |
7 | 7 | #include <linux/pm.h> |
8 | - | |
8 | + | |
9 | 9 | struct pt_regs; |
10 | - | |
10 | + | |
11 | 11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | - | |
13 | -/** | |
12 | + | |
13 | +/** | |
14 | 14 | * set_nmi_callback |
15 | 15 | * |
16 | 16 | * Set a handler for an NMI. Only one handler may be |
17 | 17 | * set. Return 1 if the NMI was handled. |
18 | 18 | */ |
19 | 19 | void set_nmi_callback(nmi_callback_t callback); |
20 | - | |
21 | -/** | |
20 | + | |
21 | +/** | |
22 | 22 | * unset_nmi_callback |
23 | 23 | * |
24 | 24 | * Remove the handler previously set. |
25 | 25 | */ |
26 | 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 | 42 | #endif /* ASM_NMI_H */ |
include/asm-x86_64/apic.h
... | ... | @@ -79,26 +79,10 @@ |
79 | 79 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
80 | 80 | extern void setup_boot_APIC_clock (void); |
81 | 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 | 82 | extern int APIC_init_uniprocessor (void); |
89 | 83 | extern void disable_APIC_timer(void); |
90 | 84 | extern void enable_APIC_timer(void); |
91 | 85 | extern void clustered_apic_check(void); |
92 | - | |
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 | 86 | |
103 | 87 | extern int disable_timer_pin_1; |
104 | 88 |
include/asm-x86_64/nmi.h
... | ... | @@ -5,26 +5,27 @@ |
5 | 5 | #define ASM_NMI_H |
6 | 6 | |
7 | 7 | #include <linux/pm.h> |
8 | +#include <asm/io.h> | |
8 | 9 | |
9 | 10 | struct pt_regs; |
10 | - | |
11 | + | |
11 | 12 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | - | |
13 | -/** | |
13 | + | |
14 | +/** | |
14 | 15 | * set_nmi_callback |
15 | 16 | * |
16 | 17 | * Set a handler for an NMI. Only one handler may be |
17 | 18 | * set. Return 1 if the NMI was handled. |
18 | 19 | */ |
19 | 20 | void set_nmi_callback(nmi_callback_t callback); |
20 | - | |
21 | -/** | |
21 | + | |
22 | +/** | |
22 | 23 | * unset_nmi_callback |
23 | 24 | * |
24 | 25 | * Remove the handler previously set. |
25 | 26 | */ |
26 | 27 | void unset_nmi_callback(void); |
27 | - | |
28 | + | |
28 | 29 | #ifdef CONFIG_PM |
29 | 30 | |
30 | 31 | /** Replace the PM callback routine for NMI. */ |
... | ... | @@ -56,5 +57,22 @@ |
56 | 57 | |
57 | 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 | 77 | #endif /* ASM_NMI_H */ |