summaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-voyager
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-30 17:47:53 +0900
committerTejun Heo <tj@kernel.org>2009-01-31 14:28:50 +0900
commit552be871e67ff577ed36beb2f53d078b42304739 (patch)
treefa8a1160674f319db5c9dfe9360e22fb44ade300 /arch/x86/mach-voyager
parent2749ebe320ff9f77548d10fcc0a3464ac21c8e58 (diff)
downloadop-kernel-dev-552be871e67ff577ed36beb2f53d078b42304739.zip
op-kernel-dev-552be871e67ff577ed36beb2f53d078b42304739.tar.gz
x86: pass in cpu number to switch_to_new_gdt()
Impact: cleanup, prepare for xen boot fix. Xen needs to call this function very early to setup the GDT and per-cpu segments. Remove the call to smp_processor_id() and just pass in the cpu number. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/mach-voyager')
-rw-r--r--arch/x86/mach-voyager/voyager_smp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index 331cd6d..58c7cac 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -1746,12 +1746,13 @@ static void __init voyager_smp_prepare_cpus(unsigned int max_cpus)
static void __cpuinit voyager_smp_prepare_boot_cpu(void)
{
- switch_to_new_gdt();
+ int cpu = smp_processor_id();
+ switch_to_new_gdt(cpu);
- cpu_set(smp_processor_id(), cpu_online_map);
- cpu_set(smp_processor_id(), cpu_callout_map);
- cpu_set(smp_processor_id(), cpu_possible_map);
- cpu_set(smp_processor_id(), cpu_present_map);
+ cpu_set(cpu, cpu_online_map);
+ cpu_set(cpu, cpu_callout_map);
+ cpu_set(cpu, cpu_possible_map);
+ cpu_set(cpu, cpu_present_map);
}
static int __cpuinit voyager_cpu_up(unsigned int cpu)
OpenPOWER on IntegriCloud