diff options
Diffstat (limited to 'arch/i386/kernel/nmi.c')
-rw-r--r-- | arch/i386/kernel/nmi.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 7d3f4e22d6fb..b11abacc5cfd 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -383,6 +383,34 @@ void enable_timer_nmi_watchdog(void) | |||
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | static void __acpi_nmi_disable(void *__unused) | ||
387 | { | ||
388 | apic_write_around(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED); | ||
389 | } | ||
390 | |||
391 | /* | ||
392 | * Disable timer based NMIs on all CPUs: | ||
393 | */ | ||
394 | void acpi_nmi_disable(void) | ||
395 | { | ||
396 | if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC) | ||
397 | on_each_cpu(__acpi_nmi_disable, NULL, 0, 1); | ||
398 | } | ||
399 | |||
400 | static void __acpi_nmi_enable(void *__unused) | ||
401 | { | ||
402 | apic_write_around(APIC_LVT0, APIC_DM_NMI); | ||
403 | } | ||
404 | |||
405 | /* | ||
406 | * Enable timer based NMIs on all CPUs: | ||
407 | */ | ||
408 | void acpi_nmi_enable(void) | ||
409 | { | ||
410 | if (atomic_read(&nmi_active) && nmi_watchdog == NMI_IO_APIC) | ||
411 | on_each_cpu(__acpi_nmi_enable, NULL, 0, 1); | ||
412 | } | ||
413 | |||
386 | #ifdef CONFIG_PM | 414 | #ifdef CONFIG_PM |
387 | 415 | ||
388 | static int nmi_pm_active; /* nmi_active before suspend */ | 416 | static int nmi_pm_active; /* nmi_active before suspend */ |