x86, traps: split out math_error and simd_math_error
[deliverable/linux.git] / include / asm-x86 / nmi.h
CommitLineData
77ef50a5
VN
1#ifndef ASM_X86__NMI_H
2#define ASM_X86__NMI_H
6d60cd53
GOC
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
6d60cd53
GOC
18#ifdef CONFIG_X86_64
19extern void default_do_nmi(struct pt_regs *);
6d60cd53
GOC
20#endif
21
ddca03c9 22extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
6d60cd53
GOC
23extern int check_nmi_watchdog(void);
24extern int nmi_watchdog_enabled;
6d60cd53
GOC
25extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
26extern int avail_to_resrv_perfctr_nmi(unsigned int);
27extern int reserve_perfctr_nmi(unsigned int);
28extern void release_perfctr_nmi(unsigned int);
29extern int reserve_evntsel_nmi(unsigned int);
30extern void release_evntsel_nmi(unsigned int);
6d60cd53
GOC
31
32extern void setup_apic_nmi_watchdog(void *);
33extern void stop_apic_nmi_watchdog(void *);
34extern void disable_timer_nmi_watchdog(void);
35extern void enable_timer_nmi_watchdog(void);
36extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
b3e15bde 37extern void cpu_nmi_set_wd_enabled(void);
6d60cd53
GOC
38
39extern atomic_t nmi_active;
40extern unsigned int nmi_watchdog;
6d60cd53
GOC
41#define NMI_NONE 0
42#define NMI_IO_APIC 1
43#define NMI_LOCAL_APIC 2
44#define NMI_INVALID 3
6d60cd53
GOC
45
46struct ctl_table;
47struct file;
48extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
49 void __user *, size_t *, loff_t *);
50extern int unknown_nmi_panic;
51
52void __trigger_all_cpu_backtrace(void);
53#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
54
148b5083
MR
55static inline void localise_nmi_watchdog(void)
56{
57 if (nmi_watchdog == NMI_IO_APIC)
58 nmi_watchdog = NMI_LOCAL_APIC;
59}
4de00436
CG
60
61/* check if nmi_watchdog is active (ie was specified at boot) */
62static inline int nmi_watchdog_active(void)
63{
64 /*
65 * actually it should be:
66 * return (nmi_watchdog == NMI_LOCAL_APIC ||
67 * nmi_watchdog == NMI_IO_APIC)
68 * but since they are power of two we could use a
69 * cheaper way --cvg
70 */
71 return nmi_watchdog & 0x3;
72}
6d60cd53
GOC
73#endif
74
75void lapic_watchdog_stop(void);
76int lapic_watchdog_init(unsigned nmi_hz);
77int lapic_wd_event(unsigned nmi_hz);
78unsigned lapic_adjust_nmi_hz(unsigned hz);
79int lapic_watchdog_ok(void);
80void disable_lapic_nmi_watchdog(void);
81void enable_lapic_nmi_watchdog(void);
82void stop_nmi(void);
83void restart_nmi(void);
84
77ef50a5 85#endif /* ASM_X86__NMI_H */
This page took 0.209764 seconds and 5 git commands to generate.