diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:01 -0400 |
commit | 6d60cd5359e261cad1e519e77ca733c05c2f8025 (patch) | |
tree | 9b5e05b78bca00c7e55a997877d3e341fce5ddab /include/asm-x86 | |
parent | e32ede19ac64b5cd896e6d28aa51d34887791ab2 (diff) |
x86: unify nmi_32.h and nmi_64.h
Two more files goes away. nmi_64.h and nmi_32.h gives birth
to nmi.h
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/nmi.h | 92 | ||||
-rw-r--r-- | include/asm-x86/nmi_32.h | 61 | ||||
-rw-r--r-- | include/asm-x86/nmi_64.h | 88 |
3 files changed, 89 insertions, 152 deletions
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h index 53ccac14cead..2b9419903476 100644 --- a/include/asm-x86/nmi.h +++ b/include/asm-x86/nmi.h | |||
@@ -1,5 +1,91 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifndef _ASM_X86_NMI_H_ |
2 | # include "nmi_32.h" | 2 | #define _ASM_X86_NMI_H_ |
3 | |||
4 | #include <linux/pm.h> | ||
5 | #include <asm/irq.h> | ||
6 | #include <asm/io.h> | ||
7 | |||
8 | #ifdef ARCH_HAS_NMI_WATCHDOG | ||
9 | |||
10 | /** | ||
11 | * do_nmi_callback | ||
12 | * | ||
13 | * Check to see if a callback exists and execute it. Return 1 | ||
14 | * if the handler exists and was handled successfully. | ||
15 | */ | ||
16 | int do_nmi_callback(struct pt_regs *regs, int cpu); | ||
17 | |||
18 | #ifdef CONFIG_PM | ||
19 | |||
20 | /** Replace the PM callback routine for NMI. */ | ||
21 | struct pm_dev *set_nmi_pm_callback(pm_callback callback); | ||
22 | |||
23 | /** Unset the PM callback routine back to the default. */ | ||
24 | void unset_nmi_pm_callback(struct pm_dev *dev); | ||
25 | |||
3 | #else | 26 | #else |
4 | # include "nmi_64.h" | 27 | |
28 | static inline struct pm_dev *set_nmi_pm_callback(pm_callback callback) | ||
29 | { | ||
30 | return 0; | ||
31 | } | ||
32 | |||
33 | static inline void unset_nmi_pm_callback(struct pm_dev *dev) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | #endif /* CONFIG_PM */ | ||
38 | |||
39 | #ifdef CONFIG_X86_64 | ||
40 | extern void default_do_nmi(struct pt_regs *); | ||
41 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); | ||
42 | #endif | ||
43 | |||
44 | extern int check_nmi_watchdog(void); | ||
45 | extern int nmi_watchdog_enabled; | ||
46 | extern int unknown_nmi_panic; | ||
47 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | ||
48 | extern int avail_to_resrv_perfctr_nmi(unsigned int); | ||
49 | extern int reserve_perfctr_nmi(unsigned int); | ||
50 | extern void release_perfctr_nmi(unsigned int); | ||
51 | extern int reserve_evntsel_nmi(unsigned int); | ||
52 | extern void release_evntsel_nmi(unsigned int); | ||
53 | extern void nmi_watchdog_default(void); | ||
54 | |||
55 | extern void setup_apic_nmi_watchdog(void *); | ||
56 | extern void stop_apic_nmi_watchdog(void *); | ||
57 | extern void disable_timer_nmi_watchdog(void); | ||
58 | extern void enable_timer_nmi_watchdog(void); | ||
59 | extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason); | ||
60 | |||
61 | extern atomic_t nmi_active; | ||
62 | extern unsigned int nmi_watchdog; | ||
63 | #define NMI_DISABLED -1 | ||
64 | #define NMI_NONE 0 | ||
65 | #define NMI_IO_APIC 1 | ||
66 | #define NMI_LOCAL_APIC 2 | ||
67 | #define NMI_INVALID 3 | ||
68 | #define NMI_DEFAULT NMI_DISABLED | ||
69 | |||
70 | struct ctl_table; | ||
71 | struct file; | ||
72 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
73 | void __user *, size_t *, loff_t *); | ||
74 | extern int unknown_nmi_panic; | ||
75 | |||
76 | void __trigger_all_cpu_backtrace(void); | ||
77 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | ||
78 | |||
79 | #endif | ||
80 | |||
81 | void lapic_watchdog_stop(void); | ||
82 | int lapic_watchdog_init(unsigned nmi_hz); | ||
83 | int lapic_wd_event(unsigned nmi_hz); | ||
84 | unsigned lapic_adjust_nmi_hz(unsigned hz); | ||
85 | int lapic_watchdog_ok(void); | ||
86 | void disable_lapic_nmi_watchdog(void); | ||
87 | void enable_lapic_nmi_watchdog(void); | ||
88 | void stop_nmi(void); | ||
89 | void restart_nmi(void); | ||
90 | |||
5 | #endif | 91 | #endif |
diff --git a/include/asm-x86/nmi_32.h b/include/asm-x86/nmi_32.h deleted file mode 100644 index 7206c7e8a388..000000000000 --- a/include/asm-x86/nmi_32.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | #ifndef ASM_NMI_H | ||
2 | #define ASM_NMI_H | ||
3 | |||
4 | #include <linux/pm.h> | ||
5 | #include <asm/irq.h> | ||
6 | |||
7 | #ifdef ARCH_HAS_NMI_WATCHDOG | ||
8 | |||
9 | /** | ||
10 | * do_nmi_callback | ||
11 | * | ||
12 | * Check to see if a callback exists and execute it. Return 1 | ||
13 | * if the handler exists and was handled successfully. | ||
14 | */ | ||
15 | int do_nmi_callback(struct pt_regs *regs, int cpu); | ||
16 | |||
17 | extern int nmi_watchdog_enabled; | ||
18 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | ||
19 | extern int avail_to_resrv_perfctr_nmi(unsigned int); | ||
20 | extern int reserve_perfctr_nmi(unsigned int); | ||
21 | extern void release_perfctr_nmi(unsigned int); | ||
22 | extern int reserve_evntsel_nmi(unsigned int); | ||
23 | extern void release_evntsel_nmi(unsigned int); | ||
24 | |||
25 | extern void setup_apic_nmi_watchdog (void *); | ||
26 | extern void stop_apic_nmi_watchdog (void *); | ||
27 | extern void disable_timer_nmi_watchdog(void); | ||
28 | extern void enable_timer_nmi_watchdog(void); | ||
29 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
30 | |||
31 | extern atomic_t nmi_active; | ||
32 | extern unsigned int nmi_watchdog; | ||
33 | #define NMI_DISABLED -1 | ||
34 | #define NMI_NONE 0 | ||
35 | #define NMI_IO_APIC 1 | ||
36 | #define NMI_LOCAL_APIC 2 | ||
37 | #define NMI_INVALID 3 | ||
38 | #define NMI_DEFAULT NMI_DISABLED | ||
39 | |||
40 | struct ctl_table; | ||
41 | struct file; | ||
42 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
43 | void __user *, size_t *, loff_t *); | ||
44 | extern int unknown_nmi_panic; | ||
45 | |||
46 | void __trigger_all_cpu_backtrace(void); | ||
47 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | ||
48 | |||
49 | #endif | ||
50 | |||
51 | void lapic_watchdog_stop(void); | ||
52 | int lapic_watchdog_init(unsigned nmi_hz); | ||
53 | int lapic_wd_event(unsigned nmi_hz); | ||
54 | unsigned lapic_adjust_nmi_hz(unsigned hz); | ||
55 | int lapic_watchdog_ok(void); | ||
56 | void disable_lapic_nmi_watchdog(void); | ||
57 | void enable_lapic_nmi_watchdog(void); | ||
58 | void stop_nmi(void); | ||
59 | void restart_nmi(void); | ||
60 | |||
61 | #endif /* ASM_NMI_H */ | ||
diff --git a/include/asm-x86/nmi_64.h b/include/asm-x86/nmi_64.h deleted file mode 100644 index 94a5b19e3620..000000000000 --- a/include/asm-x86/nmi_64.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef ASM_NMI_H | ||
2 | #define ASM_NMI_H | ||
3 | |||
4 | #include <linux/pm.h> | ||
5 | #include <asm/io.h> | ||
6 | |||
7 | /** | ||
8 | * do_nmi_callback | ||
9 | * | ||
10 | * Check to see if a callback exists and execute it. Return 1 | ||
11 | * if the handler exists and was handled successfully. | ||
12 | */ | ||
13 | int do_nmi_callback(struct pt_regs *regs, int cpu); | ||
14 | |||
15 | #ifdef CONFIG_PM | ||
16 | |||
17 | /** Replace the PM callback routine for NMI. */ | ||
18 | struct pm_dev * set_nmi_pm_callback(pm_callback callback); | ||
19 | |||
20 | /** Unset the PM callback routine back to the default. */ | ||
21 | void unset_nmi_pm_callback(struct pm_dev * dev); | ||
22 | |||
23 | #else | ||
24 | |||
25 | static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback) | ||
26 | { | ||
27 | return 0; | ||
28 | } | ||
29 | |||
30 | static inline void unset_nmi_pm_callback(struct pm_dev * dev) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | #endif /* CONFIG_PM */ | ||
35 | |||
36 | extern void default_do_nmi(struct pt_regs *); | ||
37 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); | ||
38 | |||
39 | extern int unknown_nmi_panic; | ||
40 | extern int nmi_watchdog_enabled; | ||
41 | |||
42 | extern int check_nmi_watchdog(void); | ||
43 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | ||
44 | extern int avail_to_resrv_perfctr_nmi(unsigned int); | ||
45 | extern int reserve_perfctr_nmi(unsigned int); | ||
46 | extern void release_perfctr_nmi(unsigned int); | ||
47 | extern int reserve_evntsel_nmi(unsigned int); | ||
48 | extern void release_evntsel_nmi(unsigned int); | ||
49 | |||
50 | extern void setup_apic_nmi_watchdog (void *); | ||
51 | extern void stop_apic_nmi_watchdog (void *); | ||
52 | extern void disable_timer_nmi_watchdog(void); | ||
53 | extern void enable_timer_nmi_watchdog(void); | ||
54 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
55 | |||
56 | extern void nmi_watchdog_default(void); | ||
57 | |||
58 | extern atomic_t nmi_active; | ||
59 | extern unsigned int nmi_watchdog; | ||
60 | #define NMI_DISABLED -1 | ||
61 | #define NMI_NONE 0 | ||
62 | #define NMI_IO_APIC 1 | ||
63 | #define NMI_LOCAL_APIC 2 | ||
64 | #define NMI_INVALID 3 | ||
65 | #define NMI_DEFAULT NMI_DISABLED | ||
66 | |||
67 | struct ctl_table; | ||
68 | struct file; | ||
69 | extern int proc_nmi_enabled(struct ctl_table *, int , struct file *, | ||
70 | void __user *, size_t *, loff_t *); | ||
71 | |||
72 | extern int unknown_nmi_panic; | ||
73 | |||
74 | void __trigger_all_cpu_backtrace(void); | ||
75 | #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() | ||
76 | |||
77 | |||
78 | void lapic_watchdog_stop(void); | ||
79 | int lapic_watchdog_init(unsigned nmi_hz); | ||
80 | int lapic_wd_event(unsigned nmi_hz); | ||
81 | unsigned lapic_adjust_nmi_hz(unsigned hz); | ||
82 | int lapic_watchdog_ok(void); | ||
83 | void disable_lapic_nmi_watchdog(void); | ||
84 | void enable_lapic_nmi_watchdog(void); | ||
85 | void stop_nmi(void); | ||
86 | void restart_nmi(void); | ||
87 | |||
88 | #endif /* ASM_NMI_H */ | ||