summaryrefslogtreecommitdiff
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-05-15 12:26:39 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-05-15 12:26:39 +0530
commit3f014f1d49721355a49bf952907349f4dea56ee3 (patch)
tree7e65f707b9e168d90dd8a46aebd5fd82d5eefcce /arch/arm/kernel
parent21092209a6a1359e4435592d92236aea62b2af68 (diff)
Revert "ARM: 7405/1: kexec: call platform_cpu_kill on the killer rather than the victim"
This reverts commit be174eb14346d61c9308ee95fb456dd32a1dc682 as this breaks cpu reboot. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/smp.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index f02cd8a7d5fe..95a95850682f 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -514,6 +514,10 @@ static void ipi_cpu_stop(unsigned int cpu)
local_fiq_disable();
local_irq_disable();
+#ifdef CONFIG_HOTPLUG_CPU
+ platform_cpu_kill(cpu);
+#endif
+
while (1)
cpu_relax();
}
@@ -630,25 +634,17 @@ void smp_send_reschedule(int cpu)
smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
}
-#ifdef CONFIG_HOTPLUG_CPU
-static void smp_kill_cpus(cpumask_t *mask)
-{
- unsigned int cpu;
- for_each_cpu(cpu, mask)
- platform_cpu_kill(cpu);
-}
-#else
-static void smp_kill_cpus(cpumask_t *mask) { }
-#endif
-
void smp_send_stop(void)
{
unsigned long timeout;
- struct cpumask mask;
- cpumask_copy(&mask, cpu_online_mask);
- cpumask_clear_cpu(smp_processor_id(), &mask);
- smp_cross_call(&mask, IPI_CPU_STOP);
+ if (num_online_cpus() > 1) {
+ struct cpumask mask;
+ cpumask_copy(&mask, cpu_online_mask);
+ cpumask_clear_cpu(smp_processor_id(), &mask);
+
+ smp_cross_call(&mask, IPI_CPU_STOP);
+ }
/* Wait up to one second for other CPUs to stop */
timeout = USEC_PER_SEC;
@@ -657,8 +653,6 @@ void smp_send_stop(void)
if (num_online_cpus() > 1)
pr_warning("SMP: failed to stop secondary CPUs\n");
-
- smp_kill_cpus(&mask);
}
/*