From 2edbf102351d644f1438bd3cc1301483204136b1 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 2 May 2011 14:18:52 +0200 Subject: [PATCH] --- yaml --- r: 245697 b: refs/heads/master c: c4b90c11992e61123071977c0e5556e59a70852c h: refs/heads/master i: 245695: 118f4d61cca567b014db892c2be30112b1b230aa v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/apic/apic.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ccaa0186e6c4..71157a6b8b93 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: acd26d611e60c1a7c2a14269ab99760f779121f4 +refs/heads/master: c4b90c11992e61123071977c0e5556e59a70852c diff --git a/trunk/arch/x86/kernel/apic/apic.c b/trunk/arch/x86/kernel/apic/apic.c index 2bc503bf9e99..a6cd02a92683 100644 --- a/trunk/arch/x86/kernel/apic/apic.c +++ b/trunk/arch/x86/kernel/apic/apic.c @@ -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 /*