summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-01-23 14:37:30 +0100
committerIngo Molnar <mingo@elte.hu>2011-01-28 14:54:05 +0100
commit4c321ff8a01a95badf5d5403d80ca4e0ab07fce7 (patch)
tree6fb9715b01c94988e20fa3ac2324c364854e6a79 /arch/x86/kernel/smpboot.c
parent1245e1668c6e52bee76a423f8fab3bfcdd6226ae (diff)
x86: Replace cpu_2_logical_apicid[] with early percpu variable
Unlike x86_64, on x86_32, the mapping from cpu to logical apicid may vary depending on apic in use. cpu_2_logical_apicid[] array is used for this mapping. Replace it with early percpu variable x86_cpu_to_logical_apicid to make it better aligned with other mappings. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: eric.dumazet@gmail.com Cc: yinghai@kernel.org Cc: brgerst@gmail.com Cc: gorcunov@gmail.com Cc: penberg@kernel.org Cc: shaohui.zheng@intel.com Cc: rientjes@google.com LKML-Reference: <1295789862-25482-5-git-send-email-tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 53a85baaecc..df934e46bf5 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -165,9 +165,6 @@ static void unmap_cpu_to_node(int cpu)
#endif
#ifdef CONFIG_X86_32
-u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly =
- { [0 ... NR_CPUS-1] = BAD_APICID };
-
static void map_cpu_to_logical_apicid(void)
{
int cpu = smp_processor_id();
@@ -177,13 +174,13 @@ static void map_cpu_to_logical_apicid(void)
if (!node_online(node))
node = first_online_node;
- cpu_2_logical_apicid[cpu] = apicid;
+ early_per_cpu(x86_cpu_to_logical_apicid, cpu) = apicid;
map_cpu_to_node(cpu, node);
}
void numa_remove_cpu(int cpu)
{
- cpu_2_logical_apicid[cpu] = BAD_APICID;
+ early_per_cpu(x86_cpu_to_logical_apicid, cpu) = BAD_APICID;
unmap_cpu_to_node(cpu);
}
#else