|
@@ -1237,6 +1237,16 @@ void __cpuinit setup_local_APIC(void)
|
|
|
/* always use the value from LDR */
|
|
|
early_per_cpu(x86_cpu_to_logical_apicid, cpu) =
|
|
|
logical_smp_processor_id();
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Some NUMA implementations (NUMAQ) don't initialize apicid to
|
|
|
+ * node mapping during NUMA init. Now that logical apicid is
|
|
|
+ * guaranteed to be known, give it another chance. This is already
|
|
|
+ * a bit too late - percpu allocation has already happened without
|
|
|
+ * proper NUMA affinity.
|
|
|
+ */
|
|
|
+ set_apicid_to_node(early_per_cpu(x86_cpu_to_apicid, cpu),
|
|
|
+ apic->x86_32_numa_cpu_node(cpu));
|
|
|
#endif
|
|
|
|
|
|
/*
|