]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use remove_from_maps in cpu_disable
authorGlauber Costa <gcosta@redhat.com>
Mon, 3 Mar 2008 17:13:05 +0000 (14:13 -0300)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:56 +0000 (17:40 +0200)
it is already used in x86_64. In i386, it only
removes from cpu_online_map

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/smpboot_32.c
arch/x86/kernel/smpboot_64.c

index a58ca7f18013a2c78dccaa72a6a540a70b510753..4939b3a01b245c7e37eeb111df04fd3d05f54686 100644 (file)
@@ -1041,6 +1041,11 @@ void __init native_smp_prepare_boot_cpu(void)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
+static void __ref remove_cpu_from_maps(int cpu)
+{
+       cpu_clear(cpu, cpu_online_map);
+}
+
 int __cpu_disable(void)
 {
        cpumask_t map = cpu_online_map;
@@ -1066,7 +1071,7 @@ int __cpu_disable(void)
 
        remove_siblinginfo(cpu);
 
-       cpu_clear(cpu, map);
+       remove_cpu_from_maps(cpu);
        fixup_irqs(map);
        /* It's now safe to remove this processor from the online map */
        cpu_clear(cpu, cpu_online_map);
index ca3a3c5b64fea453ff8c7bb21925a9a4426922d6..6509d3c1b3dfd9a84064d11297dd165f418a3961 100644 (file)
@@ -838,10 +838,9 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-static void __ref remove_cpu_from_maps(void)
+static void __ref remove_cpu_from_maps(int cpu)
 {
-       int cpu = smp_processor_id();
-
+       cpu_clear(cpu, cpu_online_map);
        cpu_clear(cpu, cpu_callout_map);
        cpu_clear(cpu, cpu_callin_map);
        clear_bit(cpu, (unsigned long *)&cpu_initialized); /* was set by cpu_init() */
@@ -880,8 +879,7 @@ int __cpu_disable(void)
        remove_siblinginfo(cpu);
 
        /* It's now safe to remove this processor from the online map */
-       cpu_clear(cpu, cpu_online_map);
-       remove_cpu_from_maps();
+       remove_cpu_from_maps(cpu);
        fixup_irqs(cpu_online_map);
        return 0;
 }