From 9adc13867ec5fe0cd35434f92954d90e42381f0b Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 4 Dec 2008 13:33:35 +0100 Subject: [PATCH] x86: fix early panic with boot option "nosmp" Impact: fix boot crash with numcpus=0 on certain systems Fix early exception in __get_smp_config with nosmp. Bail out early when there is no MP table. Reported-by: Wu Fengguang Signed-off-by: Andi Kleen Tested-by: Wu Fengguang Signed-off-by: Ingo Molnar --- arch/x86/kernel/mpparse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index f98f4e1dba0..0f4c1fd5a1f 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -604,6 +604,9 @@ static void __init __get_smp_config(unsigned int early) printk(KERN_INFO "Using ACPI for processor (LAPIC) " "configuration information\n"); + if (!mpf) + return; + printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification); #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) -- 2.41.0