]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: APIC/UP: Downgrade the NMI watchdog for no I/O APIC
authorMaciej W. Rozycki <macro@linux-mips.org>
Fri, 6 Jun 2008 02:27:49 +0000 (03:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 07:13:17 +0000 (09:13 +0200)
 If configured to use the I/O APIC, the NMI watchdog is deemed to fail if
the chip will not be used in the UP configuration, because "noapic" has
been specified or the chip is simply not there.  Downgrade to the local
APIC watchdog to rectify.

The new #ifdef is ugly, I know.  A proper solution is to provide suitable
definitions of smp_found_config, etc. for !CONFIG_X86_IO_APIC in a header.
Likewise the whole if () condition should be moved to a static inline
function.  Such clean-ups are beyond the scope of this change and can be
done once the whole issue of the timer has been sorted out.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_32.c
arch/x86/kernel/apic_64.c

index 4b99b1bdeb6cbb090e5868138922b259da7d98fe..26e7a62e9ab6fdb4cf3f69a0fba493dc7b0555cb 100644 (file)
@@ -1269,6 +1269,10 @@ int __init APIC_init_uniprocessor(void)
 
        setup_local_APIC();
 
+#ifdef CONFIG_X86_IO_APIC
+       if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
+#endif
+               localise_nmi_watchdog();
        end_local_APIC_setup();
 #ifdef CONFIG_X86_IO_APIC
        if (smp_found_config)
index 07fda23a9f76aaab918a2c38db509e3b3d4c7dbb..13eac4f984c356224e6ed4ff32d62c07eb024329 100644 (file)
@@ -954,6 +954,8 @@ int __init APIC_init_uniprocessor(void)
        if (!skip_ioapic_setup && nr_ioapics)
                enable_IO_APIC();
 
+       if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
+               localise_nmi_watchdog();
        end_local_APIC_setup();
 
        if (smp_found_config && !skip_ioapic_setup && nr_ioapics)