Discussion:
[PATCH 4.8 105/140] x86/boot/smp: Dont try to poke disabled/non-existent APIC
Greg Kroah-Hartman
2016-10-26 12:22:45 UTC
Permalink
4.8-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ville Syrjälä <***@linux.intel.com>

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ä <***@linux.intel.com>
Cc: Andy Lutomirski <***@kernel.org>
Cc: Borislav Petkov <***@alien8.de>
Cc: Borislav Petkov <***@suse.de>
Cc: Brian Gerst <***@gmail.com>
Cc: Denys Vlasenko <***@redhat.com>
Cc: Eric Biederman <***@xmission.com>
Cc: H. Peter Anvin <***@zytor.com>
Cc: Jiri Olsa <***@redhat.com>
Cc: Josh Poimboeuf <***@redhat.com>
Cc: Juergen Gross <***@suse.com>
Cc: Len Brown <***@intel.com>
Cc: Linus Torvalds <***@linux-foundation.org>
Cc: Peter Zijlstra <***@infradead.org>
Cc: Prarit Bhargava <***@redhat.com>
Cc: Thomas Gleixner <***@linutronix.de>
Cc: Yinghai Lu <***@kernel.org>
Cc: ***@redhat.com
Cc: ***@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-***@linux.intel.com
Signed-off-by: Ingo Molnar <***@kernel.org>
Signed-off-by: Greg Kroah-Hartman <***@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;

Loading...