arch/x86: Handle non enumerated CPU after physical hotplug
[deliverable/linux.git] / arch / x86 / kernel / smpboot.c
index 75a045424be73de5f908903f8c5bf56580a9198d..82b17373b66ad80e4b4d5e935b5e82d4fe3b097f 100644 (file)
@@ -1406,9 +1406,21 @@ __init void prefill_possible_map(void)
 {
        int i, possible;
 
-       /* no processor from mptable or madt */
-       if (!num_processors)
-               num_processors = 1;
+       /* 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();
+
+               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);
+
+               if (!num_processors)
+                       num_processors = 1;
+       }
 
        i = setup_max_cpus ?: 1;
        if (setup_possible_cpus == -1) {
This page took 0.024897 seconds and 5 git commands to generate.