4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrj?l? <ville.syrjala@xxxxxxxxxxxxxxx> commit ff8560512b8d4b7ca3ef4fd69166634ac30b2525 upstream. 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 at linux.intel.com> Cc: Andy Lutomirski <luto at kernel.org> Cc: Borislav Petkov <bp at alien8.de> Cc: Borislav Petkov <bp at suse.de> Cc: Brian Gerst <brgerst at gmail.com> Cc: Denys Vlasenko <dvlasenk at redhat.com> Cc: Eric Biederman <ebiederm at xmission.com> Cc: H. Peter Anvin <hpa at zytor.com> Cc: Jiri Olsa <jolsa at redhat.com> Cc: Josh Poimboeuf <jpoimboe at redhat.com> Cc: Juergen Gross <jgross at suse.com> Cc: Len Brown <len.brown at intel.com> Cc: Linus Torvalds <torvalds at linux-foundation.org> Cc: Peter Zijlstra <peterz at infradead.org> Cc: Prarit Bhargava <prarit at redhat.com> Cc: Thomas Gleixner <tglx at linutronix.de> Cc: Yinghai Lu <yinghai at kernel.org> Cc: dyoung at redhat.com Cc: kexec at lists.infradead.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 at linux.intel.com Signed-off-by: Ingo Molnar <mingo at kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org> --- arch/x86/kernel/smpboot.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1408,15 +1408,17 @@ __init void prefill_possible_map(void) /* No boot processor was found in mptable or ACPI MADT */ if (!num_processors) { - int apicid = boot_cpu_physical_apicid; - int cpu = hard_smp_processor_id(); + if (boot_cpu_has(X86_FEATURE_APIC)) { + int apicid = boot_cpu_physical_apicid; + int cpu = hard_smp_processor_id(); - pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu); + pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu); - /* Make sure boot cpu is enumerated */ - if (apic->cpu_present_to_apicid(0) == BAD_APICID && - apic->apic_id_valid(apicid)) - generic_processor_info(apicid, boot_cpu_apic_version); + /* Make sure boot cpu is enumerated */ + if (apic->cpu_present_to_apicid(0) == BAD_APICID && + apic->apic_id_valid(apicid)) + generic_processor_info(apicid, boot_cpu_apic_version); + } if (!num_processors) num_processors = 1;