]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: move cpu_exit_clear to process_32.c
authorGlauber Costa <gcosta@redhat.com>
Wed, 4 Jun 2008 18:35:03 +0000 (15:35 -0300)
committerIngo Molnar <mingo@elte.hu>
Tue, 8 Jul 2008 10:48:24 +0000 (12:48 +0200)
Take it out of smpboot.c, and move it to process_32.c, closer
to its only user.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/process_32.c
arch/x86/kernel/smpboot.c
include/asm-x86/numa_32.h
include/asm-x86/smp.h

index c2a11d77b1b5664391b96577d67c698fec5534d3..9a139f6c9df30fa2c304e96da89b99fd62b78a8d 100644 (file)
@@ -74,6 +74,22 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
 
 #ifdef CONFIG_HOTPLUG_CPU
 #include <asm/nmi.h>
+
+static void cpu_exit_clear(void)
+{
+       int cpu = raw_smp_processor_id();
+
+       idle_task_exit();
+
+       cpu_uninit();
+       irq_ctx_exit(cpu);
+
+       cpu_clear(cpu, cpu_callout_map);
+       cpu_clear(cpu, cpu_callin_map);
+
+       numa_remove_cpu(cpu);
+}
+
 /* We don't actually take CPU down, just spin without interrupts. */
 static inline void play_dead(void)
 {
index 820c23dbe7618996e1289d1f83c74cc53e7562cf..67af727f733a691910e4f84eefc246dee0070d5c 100644 (file)
@@ -181,7 +181,7 @@ static void map_cpu_to_logical_apicid(void)
        map_cpu_to_node(cpu, node);
 }
 
-static void numa_remove_cpu(int cpu)
+void numa_remove_cpu(int cpu)
 {
        cpu_2_logical_apicid[cpu] = BAD_APICID;
        unmap_cpu_to_node(cpu);
@@ -1227,23 +1227,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
 
 #ifdef CONFIG_HOTPLUG_CPU
 
-#  ifdef CONFIG_X86_32
-void cpu_exit_clear(void)
-{
-       int cpu = raw_smp_processor_id();
-
-       idle_task_exit();
-
-       cpu_uninit();
-       irq_ctx_exit(cpu);
-
-       cpu_clear(cpu, cpu_callout_map);
-       cpu_clear(cpu, cpu_callin_map);
-
-       numa_remove_cpu(cpu);
-}
-#  endif /* CONFIG_X86_32 */
-
 static void remove_siblinginfo(int cpu)
 {
        int sibling;
index a02674f64869e4f60343bacef573dfd4d5cfcff6..ed6c88eac848ea06b5a55dffa5bc66f7e1ae5cc5 100644 (file)
@@ -2,6 +2,7 @@
 #define _ASM_X86_32_NUMA_H 1
 
 extern int pxm_to_nid(int pxm);
+extern void numa_remove_cpu(int cpu);
 
 #ifdef CONFIG_NUMA
 extern void __init remap_numa_kva(void);
index fc1007321ef6a67d2617c2070792fcf36f1462e6..fad45f6a193fadeabcf83af21ffef6dee4776e5a 100644 (file)
@@ -188,7 +188,6 @@ static inline int hard_smp_processor_id(void)
 #endif /* CONFIG_X86_LOCAL_APIC */
 
 #ifdef CONFIG_HOTPLUG_CPU
-extern void cpu_exit_clear(void);
 extern void cpu_uninit(void);
 #endif