aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/nmi.h
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/nmi.h
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/nmi.h')
-rw-r--r--include/asm-x86/nmi.h92
1 files changed, 89 insertions, 3 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