Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/boot/smp: Don't try to poke disabled/non-existent APIC

Apparently trying to poke a disabled or non-existent APIC
leads to a box that doesn't even boot. Let's not do that.

No real clue if this is the right fix, but at least my
P3 machine boots again.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: dyoung@redhat.com
Cc: kexec@lists.infradead.org
Cc: stable@vger.kernel.org
Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
Link: http://lkml.kernel.org/r/1477102684-5092-1-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Ville Syrjälä and committed by
Ingo Molnar
ff856051 c8061485

+9 -7
+9 -7
arch/x86/kernel/smpboot.c
··· 1409 1409 1410 1410 /* No boot processor was found in mptable or ACPI MADT */ 1411 1411 if (!num_processors) { 1412 - int apicid = boot_cpu_physical_apicid; 1413 - int cpu = hard_smp_processor_id(); 1412 + if (boot_cpu_has(X86_FEATURE_APIC)) { 1413 + int apicid = boot_cpu_physical_apicid; 1414 + int cpu = hard_smp_processor_id(); 1414 1415 1415 - pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu); 1416 + pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu); 1416 1417 1417 - /* Make sure boot cpu is enumerated */ 1418 - if (apic->cpu_present_to_apicid(0) == BAD_APICID && 1419 - apic->apic_id_valid(apicid)) 1420 - generic_processor_info(apicid, boot_cpu_apic_version); 1418 + /* Make sure boot cpu is enumerated */ 1419 + if (apic->cpu_present_to_apicid(0) == BAD_APICID && 1420 + apic->apic_id_valid(apicid)) 1421 + generic_processor_info(apicid, boot_cpu_apic_version); 1422 + } 1421 1423 1422 1424 if (!num_processors) 1423 1425 num_processors = 1;