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>
This commit is contained in:
committed by
Ingo Molnar
parent
c376d45432
commit
4de0043617
@@ -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);
|
||||
|
Reference in New Issue
Block a user