]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/asm-x86_64/nmi.h
Merge head 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[mirror_ubuntu-zesty-kernel.git] / include / asm-x86_64 / nmi.h
CommitLineData
1da177e4
LT
1/*
2 * linux/include/asm-i386/nmi.h
3 */
4#ifndef ASM_NMI_H
5#define ASM_NMI_H
6
7#include <linux/pm.h>
8
9struct pt_regs;
10
11typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu);
12
13/**
14 * set_nmi_callback
15 *
16 * Set a handler for an NMI. Only one handler may be
17 * set. Return 1 if the NMI was handled.
18 */
19void set_nmi_callback(nmi_callback_t callback);
20
21/**
22 * unset_nmi_callback
23 *
24 * Remove the handler previously set.
25 */
26void unset_nmi_callback(void);
27
28#ifdef CONFIG_PM
29
30/** Replace the PM callback routine for NMI. */
31struct pm_dev * set_nmi_pm_callback(pm_callback callback);
32
33/** Unset the PM callback routine back to the default. */
34void unset_nmi_pm_callback(struct pm_dev * dev);
35
36#else
37
38static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback)
39{
40 return 0;
41}
42
43static inline void unset_nmi_pm_callback(struct pm_dev * dev)
44{
45}
46
47#endif /* CONFIG_PM */
48
49extern void default_do_nmi(struct pt_regs *);
50extern void die_nmi(char *str, struct pt_regs *regs);
51
52#define get_nmi_reason() inb(0x61)
53
54extern int panic_on_timeout;
55extern int unknown_nmi_panic;
75152114
AK
56
57extern int check_nmi_watchdog(void);
1da177e4
LT
58
59#endif /* ASM_NMI_H */