diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-06-24 16:52:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:51:42 -0400 |
commit | 4de0043617f949fdac538fd59335e2150cd1b863 (patch) | |
tree | 5f2264477030a8f3e65807537d3e717aabd2c514 /include/asm-x86 | |
parent | c376d45432d935e6f1e0ff2d6be3734bcd3ba455 (diff) |
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')
-rw-r--r-- | include/asm-x86/nmi.h | 13 |
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) | |||
56 | if (nmi_watchdog == NMI_IO_APIC) | 56 | if (nmi_watchdog == NMI_IO_APIC) |
57 | nmi_watchdog = NMI_LOCAL_APIC; | 57 | nmi_watchdog = NMI_LOCAL_APIC; |
58 | } | 58 | } |
59 | |||
60 | /* check if nmi_watchdog is active (ie was specified at boot) */ | ||
61 | static inline int nmi_watchdog_active(void) | ||
62 | { | ||
63 | /* | ||
64 | * actually it should be: | ||
65 | * return (nmi_watchdog == NMI_LOCAL_APIC || | ||
66 | * nmi_watchdog == NMI_IO_APIC) | ||
67 | * but since they are power of two we could use a | ||
68 | * cheaper way --cvg | ||
69 | */ | ||
70 | return nmi_watchdog & 0x3; | ||
71 | } | ||
59 | #endif | 72 | #endif |
60 | 73 | ||
61 | void lapic_watchdog_stop(void); | 74 | void lapic_watchdog_stop(void); |