diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-06-04 14:35:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:48:24 -0400 |
commit | 1481a3dd42c21ac4a8b9497cb9f5df816d6b064f (patch) | |
tree | 9c183950aeba74cdd5e436b8e3c32d757fc30fba | |
parent | b553a1e0ff48bd66fd18f705370e47c0b4ecea61 (diff) |
x86: move cpu_exit_clear to process_32.c
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>
-rw-r--r-- | arch/x86/kernel/process_32.c | 16 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 19 | ||||
-rw-r--r-- | include/asm-x86/numa_32.h | 1 | ||||
-rw-r--r-- | include/asm-x86/smp.h | 1 |
4 files changed, 18 insertions, 19 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index c2a11d77b1b5..9a139f6c9df3 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -74,6 +74,22 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
74 | 74 | ||
75 | #ifdef CONFIG_HOTPLUG_CPU | 75 | #ifdef CONFIG_HOTPLUG_CPU |
76 | #include <asm/nmi.h> | 76 | #include <asm/nmi.h> |
77 | |||
78 | static void cpu_exit_clear(void) | ||
79 | { | ||
80 | int cpu = raw_smp_processor_id(); | ||
81 | |||
82 | idle_task_exit(); | ||
83 | |||
84 | cpu_uninit(); | ||
85 | irq_ctx_exit(cpu); | ||
86 | |||
87 | cpu_clear(cpu, cpu_callout_map); | ||
88 | cpu_clear(cpu, cpu_callin_map); | ||
89 | |||
90 | numa_remove_cpu(cpu); | ||
91 | } | ||
92 | |||
77 | /* We don't actually take CPU down, just spin without interrupts. */ | 93 | /* We don't actually take CPU down, just spin without interrupts. */ |
78 | static inline void play_dead(void) | 94 | static inline void play_dead(void) |
79 | { | 95 | { |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 820c23dbe761..67af727f733a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -181,7 +181,7 @@ static void map_cpu_to_logical_apicid(void) | |||
181 | map_cpu_to_node(cpu, node); | 181 | map_cpu_to_node(cpu, node); |
182 | } | 182 | } |
183 | 183 | ||
184 | static void numa_remove_cpu(int cpu) | 184 | void numa_remove_cpu(int cpu) |
185 | { | 185 | { |
186 | cpu_2_logical_apicid[cpu] = BAD_APICID; | 186 | cpu_2_logical_apicid[cpu] = BAD_APICID; |
187 | unmap_cpu_to_node(cpu); | 187 | unmap_cpu_to_node(cpu); |
@@ -1227,23 +1227,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
1227 | 1227 | ||
1228 | #ifdef CONFIG_HOTPLUG_CPU | 1228 | #ifdef CONFIG_HOTPLUG_CPU |
1229 | 1229 | ||
1230 | # ifdef CONFIG_X86_32 | ||
1231 | void cpu_exit_clear(void) | ||
1232 | { | ||
1233 | int cpu = raw_smp_processor_id(); | ||
1234 | |||
1235 | idle_task_exit(); | ||
1236 | |||
1237 | cpu_uninit(); | ||
1238 | irq_ctx_exit(cpu); | ||
1239 | |||
1240 | cpu_clear(cpu, cpu_callout_map); | ||
1241 | cpu_clear(cpu, cpu_callin_map); | ||
1242 | |||
1243 | numa_remove_cpu(cpu); | ||
1244 | } | ||
1245 | # endif /* CONFIG_X86_32 */ | ||
1246 | |||
1247 | static void remove_siblinginfo(int cpu) | 1230 | static void remove_siblinginfo(int cpu) |
1248 | { | 1231 | { |
1249 | int sibling; | 1232 | int sibling; |
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h index a02674f64869..ed6c88eac848 100644 --- a/include/asm-x86/numa_32.h +++ b/include/asm-x86/numa_32.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_X86_32_NUMA_H 1 | 2 | #define _ASM_X86_32_NUMA_H 1 |
3 | 3 | ||
4 | extern int pxm_to_nid(int pxm); | 4 | extern int pxm_to_nid(int pxm); |
5 | extern void numa_remove_cpu(int cpu); | ||
5 | 6 | ||
6 | #ifdef CONFIG_NUMA | 7 | #ifdef CONFIG_NUMA |
7 | extern void __init remap_numa_kva(void); | 8 | extern void __init remap_numa_kva(void); |
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index fc1007321ef6..fad45f6a193f 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -188,7 +188,6 @@ static inline int hard_smp_processor_id(void) | |||
188 | #endif /* CONFIG_X86_LOCAL_APIC */ | 188 | #endif /* CONFIG_X86_LOCAL_APIC */ |
189 | 189 | ||
190 | #ifdef CONFIG_HOTPLUG_CPU | 190 | #ifdef CONFIG_HOTPLUG_CPU |
191 | extern void cpu_exit_clear(void); | ||
192 | extern void cpu_uninit(void); | 191 | extern void cpu_uninit(void); |
193 | #endif | 192 | #endif |
194 | 193 | ||