aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 13:25:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:01 -0400
commit6d60cd5359e261cad1e519e77ca733c05c2f8025 (patch)
tree9b5e05b78bca00c7e55a997877d3e341fce5ddab /include/asm-x86
parente32ede19ac64b5cd896e6d28aa51d34887791ab2 (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.h92
-rw-r--r--include/asm-x86/nmi_32.h61
-rw-r--r--include/asm-x86/nmi_64.h88
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 */
16int do_nmi_callback(struct pt_regs *regs, int cpu);
17
18#ifdef CONFIG_PM
19
20/** Replace the PM callback routine for NMI. */
21struct pm_dev *set_nmi_pm_callback(pm_callback callback);
22
23/** Unset the PM callback routine back to the default. */
24void unset_nmi_pm_callback(struct pm_dev *dev);
25
3#else 26#else
4# include "nmi_64.h" 27
28static inline struct pm_dev *set_nmi_pm_callback(pm_callback callback)
29{
30 return 0;
31}
32
33static inline void unset_nmi_pm_callback(struct pm_dev *dev)
34{
35}
36
37#endif /* CONFIG_PM */
38
39#ifdef CONFIG_X86_64
40extern void default_do_nmi(struct pt_regs *);
41extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
42#endif
43
44extern int check_nmi_watchdog(void);
45extern int nmi_watchdog_enabled;
46extern int unknown_nmi_panic;
47extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
48extern int avail_to_resrv_perfctr_nmi(unsigned int);
49extern int reserve_perfctr_nmi(unsigned int);
50extern void release_perfctr_nmi(unsigned int);
51extern int reserve_evntsel_nmi(unsigned int);
52extern void release_evntsel_nmi(unsigned int);
53extern void nmi_watchdog_default(void);
54
55extern void setup_apic_nmi_watchdog(void *);
56extern void stop_apic_nmi_watchdog(void *);
57extern void disable_timer_nmi_watchdog(void);
58extern void enable_timer_nmi_watchdog(void);
59extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
60
61extern atomic_t nmi_active;
62extern 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
70struct ctl_table;
71struct file;
72extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
73 void __user *, size_t *, loff_t *);
74extern int unknown_nmi_panic;
75
76void __trigger_all_cpu_backtrace(void);
77#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
78
79#endif
80
81void lapic_watchdog_stop(void);
82int lapic_watchdog_init(unsigned nmi_hz);
83int lapic_wd_event(unsigned nmi_hz);
84unsigned lapic_adjust_nmi_hz(unsigned hz);
85int lapic_watchdog_ok(void);
86void disable_lapic_nmi_watchdog(void);
87void enable_lapic_nmi_watchdog(void);
88void stop_nmi(void);
89void 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 */
15int do_nmi_callback(struct pt_regs *regs, int cpu);
16
17extern int nmi_watchdog_enabled;
18extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
19extern int avail_to_resrv_perfctr_nmi(unsigned int);
20extern int reserve_perfctr_nmi(unsigned int);
21extern void release_perfctr_nmi(unsigned int);
22extern int reserve_evntsel_nmi(unsigned int);
23extern void release_evntsel_nmi(unsigned int);
24
25extern void setup_apic_nmi_watchdog (void *);
26extern void stop_apic_nmi_watchdog (void *);
27extern void disable_timer_nmi_watchdog(void);
28extern void enable_timer_nmi_watchdog(void);
29extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
30
31extern atomic_t nmi_active;
32extern 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
40struct ctl_table;
41struct file;
42extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
43 void __user *, size_t *, loff_t *);
44extern int unknown_nmi_panic;
45
46void __trigger_all_cpu_backtrace(void);
47#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
48
49#endif
50
51void lapic_watchdog_stop(void);
52int lapic_watchdog_init(unsigned nmi_hz);
53int lapic_wd_event(unsigned nmi_hz);
54unsigned lapic_adjust_nmi_hz(unsigned hz);
55int lapic_watchdog_ok(void);
56void disable_lapic_nmi_watchdog(void);
57void enable_lapic_nmi_watchdog(void);
58void stop_nmi(void);
59void 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 */
13int do_nmi_callback(struct pt_regs *regs, int cpu);
14
15#ifdef CONFIG_PM
16
17/** Replace the PM callback routine for NMI. */
18struct pm_dev * set_nmi_pm_callback(pm_callback callback);
19
20/** Unset the PM callback routine back to the default. */
21void unset_nmi_pm_callback(struct pm_dev * dev);
22
23#else
24
25static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback)
26{
27 return 0;
28}
29
30static inline void unset_nmi_pm_callback(struct pm_dev * dev)
31{
32}
33
34#endif /* CONFIG_PM */
35
36extern void default_do_nmi(struct pt_regs *);
37extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
38
39extern int unknown_nmi_panic;
40extern int nmi_watchdog_enabled;
41
42extern int check_nmi_watchdog(void);
43extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
44extern int avail_to_resrv_perfctr_nmi(unsigned int);
45extern int reserve_perfctr_nmi(unsigned int);
46extern void release_perfctr_nmi(unsigned int);
47extern int reserve_evntsel_nmi(unsigned int);
48extern void release_evntsel_nmi(unsigned int);
49
50extern void setup_apic_nmi_watchdog (void *);
51extern void stop_apic_nmi_watchdog (void *);
52extern void disable_timer_nmi_watchdog(void);
53extern void enable_timer_nmi_watchdog(void);
54extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
55
56extern void nmi_watchdog_default(void);
57
58extern atomic_t nmi_active;
59extern 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
67struct ctl_table;
68struct file;
69extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
70 void __user *, size_t *, loff_t *);
71
72extern int unknown_nmi_panic;
73
74void __trigger_all_cpu_backtrace(void);
75#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
76
77
78void lapic_watchdog_stop(void);
79int lapic_watchdog_init(unsigned nmi_hz);
80int lapic_wd_event(unsigned nmi_hz);
81unsigned lapic_adjust_nmi_hz(unsigned hz);
82int lapic_watchdog_ok(void);
83void disable_lapic_nmi_watchdog(void);
84void enable_lapic_nmi_watchdog(void);
85void stop_nmi(void);
86void restart_nmi(void);
87
88#endif /* ASM_NMI_H */