From: Ingo Molnar Date: Wed, 17 Oct 2007 16:04:34 +0000 (+0200) Subject: x86: enable NMI watchdog on nosmp X-Git-Tag: v2.6.24-rc1~476^2~96 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fb450a327fc098efe6c9f000d470abac354cfcc;p=linux-2.6 x86: enable NMI watchdog on nosmp if nosmp has been passed as a boot option, but nmi_watchdog=2 has also been enabled then keep minimal local APIC functionality around to make the watchdog work. this allowed me to debug a hard hang that would only occur with a nosmp bootup. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index edc9db69a1..83e4f40f8d 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c @@ -1021,6 +1021,12 @@ static void __init smp_boot_cpus(unsigned int max_cpus) if (!max_cpus) { smp_found_config = 0; printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); + + if (nmi_watchdog == NMI_LOCAL_APIC) { + printk(KERN_INFO "activating minimal APIC for NMI watchdog use.\n"); + connect_bsp_APIC(); + setup_local_APIC(); + } smpboot_clear_io_apic_irqs(); phys_cpu_present_map = physid_mask_of_physid(0); cpu_set(0, per_cpu(cpu_sibling_map, 0));