aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r--arch/arm/kernel/smp.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 5e86f7c47824..e8d7b1afa033 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -486,10 +486,6 @@ static void ipi_cpu_stop(unsigned int cpu)
486 local_fiq_disable(); 486 local_fiq_disable();
487 local_irq_disable(); 487 local_irq_disable();
488 488
489#ifdef CONFIG_HOTPLUG_CPU
490 platform_cpu_kill(cpu);
491#endif
492
493 while (1) 489 while (1)
494 cpu_relax(); 490 cpu_relax();
495} 491}
@@ -552,17 +548,25 @@ void smp_send_reschedule(int cpu)
552 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); 548 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
553} 549}
554 550
551#ifdef CONFIG_HOTPLUG_CPU
552static void smp_kill_cpus(cpumask_t *mask)
553{
554 unsigned int cpu;
555 for_each_cpu(cpu, mask)
556 platform_cpu_kill(cpu);
557}
558#else
559static void smp_kill_cpus(cpumask_t *mask) { }
560#endif
561
555void smp_send_stop(void) 562void smp_send_stop(void)
556{ 563{
557 unsigned long timeout; 564 unsigned long timeout;
565 struct cpumask mask;
558 566
559 if (num_online_cpus() > 1) { 567 cpumask_copy(&mask, cpu_online_mask);
560 struct cpumask mask; 568 cpumask_clear_cpu(smp_processor_id(), &mask);
561 cpumask_copy(&mask, cpu_online_mask); 569 smp_cross_call(&mask, IPI_CPU_STOP);
562 cpumask_clear_cpu(smp_processor_id(), &mask);
563
564 smp_cross_call(&mask, IPI_CPU_STOP);
565 }
566 570
567 /* Wait up to one second for other CPUs to stop */ 571 /* Wait up to one second for other CPUs to stop */
568 timeout = USEC_PER_SEC; 572 timeout = USEC_PER_SEC;
@@ -571,6 +575,8 @@ void smp_send_stop(void)
571 575
572 if (num_online_cpus() > 1) 576 if (num_online_cpus() > 1)
573 pr_warning("SMP: failed to stop secondary CPUs\n"); 577 pr_warning("SMP: failed to stop secondary CPUs\n");
578
579 smp_kill_cpus(&mask);
574} 580}
575 581
576/* 582/*