aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/nmi.h
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-06-24 22:52:06 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-08 12:51:42 +0200
commit4de0043617f949fdac538fd59335e2150cd1b863 (patch)
tree5f2264477030a8f3e65807537d3e717aabd2c514 /include/asm-x86/nmi.h
parentx86: nmi_watchdog - use NMI_NONE by default (diff)
downloadlinux-dev-4de0043617f949fdac538fd59335e2150cd1b863.tar.xz
linux-dev-4de0043617f949fdac538fd59335e2150cd1b863.zip
x86: nmi_watchdog - introduce nmi_watchdog_active() helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: macro@linux-mips.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/nmi.h')
-rw-r--r--include/asm-x86/nmi.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
index 1348e542360f..21f8d0202a82 100644
--- a/include/asm-x86/nmi.h
+++ b/include/asm-x86/nmi.h
@@ -56,6 +56,19 @@ static inline void localise_nmi_watchdog(void)
if (nmi_watchdog == NMI_IO_APIC)
nmi_watchdog = NMI_LOCAL_APIC;
}
+
+/* check if nmi_watchdog is active (ie was specified at boot) */
+static inline int nmi_watchdog_active(void)
+{
+ /*
+ * actually it should be:
+ * return (nmi_watchdog == NMI_LOCAL_APIC ||
+ * nmi_watchdog == NMI_IO_APIC)
+ * but since they are power of two we could use a
+ * cheaper way --cvg
+ */
+ return nmi_watchdog & 0x3;
+}
#endif
void lapic_watchdog_stop(void);