aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/smpboot_64.c')
-rw-r--r--arch/x86/kernel/smpboot_64.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 7ec96218a97e..420ae4a33548 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -602,7 +602,8 @@ static __init void disable_smp(void)
602 cpu_present_map = cpumask_of_cpu(0); 602 cpu_present_map = cpumask_of_cpu(0);
603 cpu_possible_map = cpumask_of_cpu(0); 603 cpu_possible_map = cpumask_of_cpu(0);
604 if (smp_found_config) 604 if (smp_found_config)
605 phys_cpu_present_map = physid_mask_of_physid(boot_cpu_id); 605 phys_cpu_present_map =
606 physid_mask_of_physid(boot_cpu_physical_apicid);
606 else 607 else
607 phys_cpu_present_map = physid_mask_of_physid(0); 608 phys_cpu_present_map = physid_mask_of_physid(0);
608 cpu_set(0, per_cpu(cpu_sibling_map, 0)); 609 cpu_set(0, per_cpu(cpu_sibling_map, 0));
@@ -637,9 +638,10 @@ static int __init smp_sanity_check(unsigned max_cpus)
637 * Should not be necessary because the MP table should list the boot 638 * Should not be necessary because the MP table should list the boot
638 * CPU too, but we do it for the sake of robustness anyway. 639 * CPU too, but we do it for the sake of robustness anyway.
639 */ 640 */
640 if (!physid_isset(boot_cpu_id, phys_cpu_present_map)) { 641 if (!physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map)) {
641 printk(KERN_NOTICE "weird, boot CPU (#%d) not listed by the BIOS.\n", 642 printk(KERN_NOTICE
642 boot_cpu_id); 643 "weird, boot CPU (#%d) not listed by the BIOS.\n",
644 boot_cpu_physical_apicid);
643 physid_set(hard_smp_processor_id(), phys_cpu_present_map); 645 physid_set(hard_smp_processor_id(), phys_cpu_present_map);
644 } 646 }
645 647
@@ -648,7 +650,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
648 */ 650 */
649 if (!cpu_has_apic) { 651 if (!cpu_has_apic) {
650 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 652 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
651 boot_cpu_id); 653 boot_cpu_physical_apicid);
652 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); 654 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
653 nr_ioapics = 0; 655 nr_ioapics = 0;
654 return -1; 656 return -1;
@@ -709,9 +711,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
709 enable_IO_APIC(); 711 enable_IO_APIC();
710 end_local_APIC_setup(); 712 end_local_APIC_setup();
711 713
712 if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_id) { 714 if (GET_APIC_ID(apic_read(APIC_ID)) != boot_cpu_physical_apicid) {
713 panic("Boot APIC ID in local APIC unexpected (%d vs %d)", 715 panic("Boot APIC ID in local APIC unexpected (%d vs %d)",
714 GET_APIC_ID(apic_read(APIC_ID)), boot_cpu_id); 716 GET_APIC_ID(apic_read(APIC_ID)), boot_cpu_physical_apicid);
715 /* Or can we switch back to PIC here? */ 717 /* Or can we switch back to PIC here? */
716 } 718 }
717 719
@@ -756,7 +758,7 @@ int __cpuinit native_cpu_up(unsigned int cpu)
756 758
757 Dprintk("++++++++++++++++++++=_---CPU UP %u\n", cpu); 759 Dprintk("++++++++++++++++++++=_---CPU UP %u\n", cpu);
758 760
759 if (apicid == BAD_APICID || apicid == boot_cpu_id || 761 if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid ||
760 !physid_isset(apicid, phys_cpu_present_map)) { 762 !physid_isset(apicid, phys_cpu_present_map)) {
761 printk("__cpu_up: bad cpu %d\n", cpu); 763 printk("__cpu_up: bad cpu %d\n", cpu);
762 return -EINVAL; 764 return -EINVAL;