|
@@ -1294,6 +1294,14 @@ static void __init smp_cpu_index_default(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+static void __init smp_get_logical_apicid(void)
|
|
|
+{
|
|
|
+ if (x2apic_mode)
|
|
|
+ cpu0_logical_apicid = apic_read(APIC_LDR);
|
|
|
+ else
|
|
|
+ cpu0_logical_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Prepare for SMP bootup. The MP table or ACPI has been read
|
|
|
* earlier. Just do some sanity checking here and enable APIC mode.
|
|
@@ -1354,11 +1362,13 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
|
|
|
}
|
|
|
|
|
|
default_setup_apic_routing();
|
|
|
- cpu0_logical_apicid = apic_bsp_setup(false);
|
|
|
+ apic_bsp_setup(false);
|
|
|
|
|
|
/* Setup local timer */
|
|
|
x86_init.timers.setup_percpu_clockev();
|
|
|
|
|
|
+ smp_get_logical_apicid();
|
|
|
+
|
|
|
pr_info("CPU0: ");
|
|
|
print_cpu_info(&cpu_data(0));
|
|
|
|