2005-04-16 22:20:36 +00:00
|
|
|
/*
|
|
|
|
* linux/include/linux/nmi.h
|
|
|
|
*/
|
|
|
|
#ifndef LINUX_NMI_H
|
|
|
|
#define LINUX_NMI_H
|
|
|
|
|
2006-09-29 08:59:03 +00:00
|
|
|
#include <linux/sched.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
#include <asm/irq.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* touch_nmi_watchdog - restart NMI watchdog timeout.
|
|
|
|
*
|
|
|
|
* If the architecture supports the NMI watchdog, touch_nmi_watchdog()
|
|
|
|
* may be used to reset the timeout - for code which intentionally
|
|
|
|
* disables interrupts for a long time. This call is stateless.
|
|
|
|
*/
|
|
|
|
#ifdef ARCH_HAS_NMI_WATCHDOG
|
2006-12-07 01:14:01 +00:00
|
|
|
#include <asm/nmi.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
extern void touch_nmi_watchdog(void);
|
2007-02-13 12:26:24 +00:00
|
|
|
extern void acpi_nmi_disable(void);
|
|
|
|
extern void acpi_nmi_enable(void);
|
2005-04-16 22:20:36 +00:00
|
|
|
#else
|
2010-05-14 15:11:21 +00:00
|
|
|
#ifndef CONFIG_HARDLOCKUP_DETECTOR
|
2007-02-13 12:26:24 +00:00
|
|
|
static inline void touch_nmi_watchdog(void)
|
|
|
|
{
|
|
|
|
touch_softlockup_watchdog();
|
|
|
|
}
|
2010-02-12 22:19:19 +00:00
|
|
|
#else
|
|
|
|
extern void touch_nmi_watchdog(void);
|
|
|
|
#endif
|
2007-02-13 12:26:24 +00:00
|
|
|
static inline void acpi_nmi_disable(void) { }
|
|
|
|
static inline void acpi_nmi_enable(void) { }
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|
|
|
|
|
2009-08-03 07:31:54 +00:00
|
|
|
/*
|
|
|
|
* Create trigger_all_cpu_backtrace() out of the arch-provided
|
|
|
|
* base function. Return whether such support was available,
|
|
|
|
* to allow calling code to fall back to some other mechanism:
|
|
|
|
*/
|
|
|
|
#ifdef arch_trigger_all_cpu_backtrace
|
|
|
|
static inline bool trigger_all_cpu_backtrace(void)
|
|
|
|
{
|
|
|
|
arch_trigger_all_cpu_backtrace();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static inline bool trigger_all_cpu_backtrace(void)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2006-12-07 01:14:01 +00:00
|
|
|
#endif
|
|
|
|
|
2010-05-07 21:11:44 +00:00
|
|
|
#ifdef CONFIG_LOCKUP_DETECTOR
|
2010-02-06 02:47:05 +00:00
|
|
|
int hw_nmi_is_cpu_stuck(struct pt_regs *);
|
2010-02-12 22:19:19 +00:00
|
|
|
u64 hw_nmi_get_sample_period(void);
|
2010-05-07 21:11:44 +00:00
|
|
|
extern int watchdog_enabled;
|
2010-02-12 22:19:19 +00:00
|
|
|
struct ctl_table;
|
2010-05-07 21:11:44 +00:00
|
|
|
extern int proc_dowatchdog_enabled(struct ctl_table *, int ,
|
2010-02-22 23:09:03 +00:00
|
|
|
void __user *, size_t *, loff_t *);
|
2010-02-06 02:47:05 +00:00
|
|
|
#endif
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif
|