diff options
Diffstat (limited to 'arch/x86/kernel/nmi.c')
-rw-r--r-- | arch/x86/kernel/nmi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index fd680c73ba77..9ebf71323c9a 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -27,6 +27,10 @@ #include <linux/kdebug.h> #include <linux/smp.h> +#include <asm/i8259.h> +#include <asm/io_apic.h> +#include <asm/smp.h> +#include <asm/nmi.h> #include <asm/proto.h> #include <asm/timer.h> @@ -129,7 +133,7 @@ int __init check_nmi_watchdog(void) if (!atomic_read(&nmi_active)) return 0; - prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); + prev_nmi_count = kmalloc(nr_cpu_ids * sizeof(int), GFP_KERNEL); if (!prev_nmi_count) goto error; @@ -175,11 +179,9 @@ int __init check_nmi_watchdog(void) kfree(prev_nmi_count); return 0; - error: -#ifdef CONFIG_X86_32 - timer_ack = !cpu_has_tsc; -#endif + if (nmi_watchdog == NMI_IO_APIC && !timer_through_8259) + disable_8259A_irq(0); return -1; } |