[ALSA] oxygen: generalize handling of DAC volume limits
[linux/fpc-iii.git] / include / asm-x86 / nmi.h
blob1e363021e72fc0dc1dd66977322f10803cf31f1c
1 #ifndef _ASM_X86_NMI_H_
2 #define _ASM_X86_NMI_H_
4 #include <linux/pm.h>
5 #include <asm/irq.h>
6 #include <asm/io.h>
8 #ifdef ARCH_HAS_NMI_WATCHDOG
10 /**
11 * do_nmi_callback
13 * Check to see if a callback exists and execute it. Return 1
14 * if the handler exists and was handled successfully.
16 int do_nmi_callback(struct pt_regs *regs, int cpu);
18 #ifdef CONFIG_PM
20 /** Replace the PM callback routine for NMI. */
21 struct pm_dev *set_nmi_pm_callback(pm_callback callback);
23 /** Unset the PM callback routine back to the default. */
24 void unset_nmi_pm_callback(struct pm_dev *dev);
26 #else
28 static inline struct pm_dev *set_nmi_pm_callback(pm_callback callback)
30 return 0;
33 static inline void unset_nmi_pm_callback(struct pm_dev *dev)
37 #endif /* CONFIG_PM */
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 extern void nmi_watchdog_default(void);
43 #else
44 #define nmi_watchdog_default() do {} while (0)
45 #endif
47 extern int check_nmi_watchdog(void);
48 extern int nmi_watchdog_enabled;
49 extern int unknown_nmi_panic;
50 extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
51 extern int avail_to_resrv_perfctr_nmi(unsigned int);
52 extern int reserve_perfctr_nmi(unsigned int);
53 extern void release_perfctr_nmi(unsigned int);
54 extern int reserve_evntsel_nmi(unsigned int);
55 extern void release_evntsel_nmi(unsigned int);
57 extern void setup_apic_nmi_watchdog(void *);
58 extern void stop_apic_nmi_watchdog(void *);
59 extern void disable_timer_nmi_watchdog(void);
60 extern void enable_timer_nmi_watchdog(void);
61 extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
63 extern atomic_t nmi_active;
64 extern unsigned int nmi_watchdog;
65 #define NMI_DISABLED -1
66 #define NMI_NONE 0
67 #define NMI_IO_APIC 1
68 #define NMI_LOCAL_APIC 2
69 #define NMI_INVALID 3
70 #define NMI_DEFAULT NMI_DISABLED
72 struct ctl_table;
73 struct file;
74 extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
75 void __user *, size_t *, loff_t *);
76 extern int unknown_nmi_panic;
78 void __trigger_all_cpu_backtrace(void);
79 #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
81 #endif
83 void lapic_watchdog_stop(void);
84 int lapic_watchdog_init(unsigned nmi_hz);
85 int lapic_wd_event(unsigned nmi_hz);
86 unsigned lapic_adjust_nmi_hz(unsigned hz);
87 int lapic_watchdog_ok(void);
88 void disable_lapic_nmi_watchdog(void);
89 void enable_lapic_nmi_watchdog(void);
90 void stop_nmi(void);
91 void restart_nmi(void);
93 #endif