diff options
author | Alex Nixon <alex.nixon@citrix.com> | 2008-08-22 06:52:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-25 04:59:18 -0400 |
commit | 93be71b672f167b1e8c23725114f86305354f0ac (patch) | |
tree | e443c353919877853fef4f26128b8747ef5a6908 /arch/x86/kernel | |
parent | e4f807c2b4d81636fc63993368646c5bfd42b22f (diff) |
x86: add cpu hotplug hooks into smp_ops
Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/process_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 8 |
4 files changed, 13 insertions, 9 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 3b7a1ddcc0bc..e382fe0ccd66 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -91,7 +91,7 @@ static void cpu_exit_clear(void) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | /* We don't actually take CPU down, just spin without interrupts. */ | 93 | /* We don't actually take CPU down, just spin without interrupts. */ |
94 | static inline void play_dead(void) | 94 | void native_play_dead(void) |
95 | { | 95 | { |
96 | /* This must be done before dead CPU ack */ | 96 | /* This must be done before dead CPU ack */ |
97 | cpu_exit_clear(); | 97 | cpu_exit_clear(); |
@@ -107,7 +107,7 @@ static inline void play_dead(void) | |||
107 | wbinvd_halt(); | 107 | wbinvd_halt(); |
108 | } | 108 | } |
109 | #else | 109 | #else |
110 | static inline void play_dead(void) | 110 | void native_play_dead(void) |
111 | { | 111 | { |
112 | BUG(); | 112 | BUG(); |
113 | } | 113 | } |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 71553b664e2a..dfd3f5752085 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -90,7 +90,7 @@ DECLARE_PER_CPU(int, cpu_state); | |||
90 | 90 | ||
91 | #include <asm/nmi.h> | 91 | #include <asm/nmi.h> |
92 | /* We halt the CPU with physical CPU hotplug */ | 92 | /* We halt the CPU with physical CPU hotplug */ |
93 | static inline void play_dead(void) | 93 | void native_play_dead(void) |
94 | { | 94 | { |
95 | idle_task_exit(); | 95 | idle_task_exit(); |
96 | mb(); | 96 | mb(); |
@@ -102,7 +102,7 @@ static inline void play_dead(void) | |||
102 | wbinvd_halt(); | 102 | wbinvd_halt(); |
103 | } | 103 | } |
104 | #else | 104 | #else |
105 | static inline void play_dead(void) | 105 | void native_play_dead(void) |
106 | { | 106 | { |
107 | BUG(); | 107 | BUG(); |
108 | } | 108 | } |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 361b7a4c640c..18f9b19f5f8f 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -214,12 +214,16 @@ void smp_call_function_single_interrupt(struct pt_regs *regs) | |||
214 | struct smp_ops smp_ops = { | 214 | struct smp_ops smp_ops = { |
215 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, | 215 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, |
216 | .smp_prepare_cpus = native_smp_prepare_cpus, | 216 | .smp_prepare_cpus = native_smp_prepare_cpus, |
217 | .cpu_up = native_cpu_up, | ||
218 | .smp_cpus_done = native_smp_cpus_done, | 217 | .smp_cpus_done = native_smp_cpus_done, |
219 | 218 | ||
220 | .smp_send_stop = native_smp_send_stop, | 219 | .smp_send_stop = native_smp_send_stop, |
221 | .smp_send_reschedule = native_smp_send_reschedule, | 220 | .smp_send_reschedule = native_smp_send_reschedule, |
222 | 221 | ||
222 | .cpu_up = native_cpu_up, | ||
223 | .cpu_die = native_cpu_die, | ||
224 | .cpu_disable = native_cpu_disable, | ||
225 | .play_dead = native_play_dead, | ||
226 | |||
223 | .send_call_func_ipi = native_send_call_func_ipi, | 227 | .send_call_func_ipi = native_send_call_func_ipi, |
224 | .send_call_func_single_ipi = native_send_call_func_single_ipi, | 228 | .send_call_func_single_ipi = native_send_call_func_single_ipi, |
225 | }; | 229 | }; |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 7985c5b3f916..c414cee296ba 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1346,7 +1346,7 @@ static void __ref remove_cpu_from_maps(int cpu) | |||
1346 | numa_remove_cpu(cpu); | 1346 | numa_remove_cpu(cpu); |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | int __cpu_disable(void) | 1349 | int native_cpu_disable(void) |
1350 | { | 1350 | { |
1351 | int cpu = smp_processor_id(); | 1351 | int cpu = smp_processor_id(); |
1352 | 1352 | ||
@@ -1385,7 +1385,7 @@ int __cpu_disable(void) | |||
1385 | return 0; | 1385 | return 0; |
1386 | } | 1386 | } |
1387 | 1387 | ||
1388 | void __cpu_die(unsigned int cpu) | 1388 | void native_cpu_die(unsigned int cpu) |
1389 | { | 1389 | { |
1390 | /* We don't do anything here: idle task is faking death itself. */ | 1390 | /* We don't do anything here: idle task is faking death itself. */ |
1391 | unsigned int i; | 1391 | unsigned int i; |
@@ -1403,12 +1403,12 @@ void __cpu_die(unsigned int cpu) | |||
1403 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); | 1403 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); |
1404 | } | 1404 | } |
1405 | #else /* ... !CONFIG_HOTPLUG_CPU */ | 1405 | #else /* ... !CONFIG_HOTPLUG_CPU */ |
1406 | int __cpu_disable(void) | 1406 | int native_cpu_disable(void) |
1407 | { | 1407 | { |
1408 | return -ENOSYS; | 1408 | return -ENOSYS; |
1409 | } | 1409 | } |
1410 | 1410 | ||
1411 | void __cpu_die(unsigned int cpu) | 1411 | void native_cpu_die(unsigned int cpu) |
1412 | { | 1412 | { |
1413 | /* We said "no" in __cpu_disable */ | 1413 | /* We said "no" in __cpu_disable */ |
1414 | BUG(); | 1414 | BUG(); |