diff options
Diffstat (limited to 'arch/blackfin/mach-common/smp.c')
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index c0ac8e643361..35e7e1eb0188 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -97,7 +97,7 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
97 | dump_stack(); | 97 | dump_stack(); |
98 | spin_unlock(&stop_lock); | 98 | spin_unlock(&stop_lock); |
99 | 99 | ||
100 | cpu_clear(cpu, cpu_online_map); | 100 | set_cpu_online(cpu, false); |
101 | 101 | ||
102 | local_irq_disable(); | 102 | local_irq_disable(); |
103 | 103 | ||
@@ -147,7 +147,7 @@ static void ipi_call_function(unsigned int cpu, struct ipi_message *msg) | |||
147 | */ | 147 | */ |
148 | resync_core_dcache(); | 148 | resync_core_dcache(); |
149 | #endif | 149 | #endif |
150 | cpu_clear(cpu, *msg->call_struct.waitmask); | 150 | cpumask_clear_cpu(cpu, msg->call_struct.waitmask); |
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
@@ -223,9 +223,10 @@ static inline void smp_send_message(cpumask_t callmap, unsigned long type, | |||
223 | struct ipi_message_queue *msg_queue; | 223 | struct ipi_message_queue *msg_queue; |
224 | struct ipi_message *msg; | 224 | struct ipi_message *msg; |
225 | unsigned long flags, next_msg; | 225 | unsigned long flags, next_msg; |
226 | cpumask_t waitmask = callmap; /* waitmask is shared by all cpus */ | 226 | cpumask_t waitmask; /* waitmask is shared by all cpus */ |
227 | 227 | ||
228 | for_each_cpu_mask(cpu, callmap) { | 228 | cpumask_copy(&waitmask, &callmap); |
229 | for_each_cpu(cpu, &callmap) { | ||
229 | msg_queue = &per_cpu(ipi_msg_queue, cpu); | 230 | msg_queue = &per_cpu(ipi_msg_queue, cpu); |
230 | spin_lock_irqsave(&msg_queue->lock, flags); | 231 | spin_lock_irqsave(&msg_queue->lock, flags); |
231 | if (msg_queue->count < BFIN_IPI_MSGQ_LEN) { | 232 | if (msg_queue->count < BFIN_IPI_MSGQ_LEN) { |
@@ -247,7 +248,7 @@ static inline void smp_send_message(cpumask_t callmap, unsigned long type, | |||
247 | } | 248 | } |
248 | 249 | ||
249 | if (wait) { | 250 | if (wait) { |
250 | while (!cpus_empty(waitmask)) | 251 | while (!cpumask_empty(&waitmask)) |
251 | blackfin_dcache_invalidate_range( | 252 | blackfin_dcache_invalidate_range( |
252 | (unsigned long)(&waitmask), | 253 | (unsigned long)(&waitmask), |
253 | (unsigned long)(&waitmask)); | 254 | (unsigned long)(&waitmask)); |
@@ -266,9 +267,9 @@ int smp_call_function(void (*func)(void *info), void *info, int wait) | |||
266 | cpumask_t callmap; | 267 | cpumask_t callmap; |
267 | 268 | ||
268 | preempt_disable(); | 269 | preempt_disable(); |
269 | callmap = cpu_online_map; | 270 | cpumask_copy(&callmap, cpu_online_mask); |
270 | cpu_clear(smp_processor_id(), callmap); | 271 | cpumask_clear_cpu(smp_processor_id(), &callmap); |
271 | if (!cpus_empty(callmap)) | 272 | if (!cpumask_empty(&callmap)) |
272 | smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait); | 273 | smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait); |
273 | 274 | ||
274 | preempt_enable(); | 275 | preempt_enable(); |
@@ -285,8 +286,8 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info, | |||
285 | 286 | ||
286 | if (cpu_is_offline(cpu)) | 287 | if (cpu_is_offline(cpu)) |
287 | return 0; | 288 | return 0; |
288 | cpus_clear(callmap); | 289 | cpumask_clear(&callmap); |
289 | cpu_set(cpu, callmap); | 290 | cpumask_set_cpu(cpu, &callmap); |
290 | 291 | ||
291 | smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait); | 292 | smp_send_message(callmap, BFIN_IPI_CALL_FUNC, func, info, wait); |
292 | 293 | ||
@@ -309,9 +310,9 @@ void smp_send_stop(void) | |||
309 | cpumask_t callmap; | 310 | cpumask_t callmap; |
310 | 311 | ||
311 | preempt_disable(); | 312 | preempt_disable(); |
312 | callmap = cpu_online_map; | 313 | cpumask_copy(&callmap, cpu_online_mask); |
313 | cpu_clear(smp_processor_id(), callmap); | 314 | cpumask_clear_cpu(smp_processor_id(), &callmap); |
314 | if (!cpus_empty(callmap)) | 315 | if (!cpumask_empty(&callmap)) |
315 | smp_send_message(callmap, BFIN_IPI_CPU_STOP, NULL, NULL, 0); | 316 | smp_send_message(callmap, BFIN_IPI_CPU_STOP, NULL, NULL, 0); |
316 | 317 | ||
317 | preempt_enable(); | 318 | preempt_enable(); |