diff options
author | rINanDO <drjisakh@gmail.com> | 2016-01-03 14:29:48 +0100 |
---|---|---|
committer | Caio Schnepper <caioschnepper@gmail.com> | 2016-02-05 02:49:47 -0800 |
commit | ab6a2b873f19b1fde020b339aab8b830ede31f74 (patch) | |
tree | 6de6609129bdbe34b67c3b753f578e9f3c17b7ce /arch/arm | |
parent | be3d845ee40c30b52b56a7fb44013674ccab03fd (diff) | |
download | kernel_samsung_smdk4412-ab6a2b873f19b1fde020b339aab8b830ede31f74.zip kernel_samsung_smdk4412-ab6a2b873f19b1fde020b339aab8b830ede31f74.tar.gz kernel_samsung_smdk4412-ab6a2b873f19b1fde020b339aab8b830ede31f74.tar.bz2 |
Revert "ARM: SMP: use a timing out completion for cpu hotplug"
This reverts commit 5ddd587f9564e31f0767b3f352aadbba5ab69e9e.
Change-Id: Idc6f8c9c70081eaa0bd95b9703c0731c48edb5bd
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/smp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 6f4ecfc..2364aa6 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -58,8 +58,6 @@ enum ipi_msg_type { IPI_CPU_BACKTRACE, }; -static DECLARE_COMPLETION(cpu_running); - int __cpuinit __cpu_up(unsigned int cpu) { struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); @@ -119,12 +117,20 @@ int __cpuinit __cpu_up(unsigned int cpu) */ ret = boot_secondary(cpu, idle); if (ret == 0) { + unsigned long timeout; + /* * CPU was successfully started, wait for it * to come online or time out. */ - wait_for_completion_timeout(&cpu_running, - msecs_to_jiffies(1000)); + timeout = jiffies + HZ; + while (time_before(jiffies, timeout)) { + if (cpu_online(cpu)) + break; + + udelay(10); + barrier(); + } if (!cpu_online(cpu)) { pr_crit("CPU%u: failed to come online\n", cpu); @@ -330,10 +336,9 @@ asmlinkage void __cpuinit secondary_start_kernel(void) /* * OK, now it's safe to let the boot CPU continue. Wait for * the CPU migration code to notice that the CPU is online - * before we continue - which happens after __cpu_up returns. + * before we continue. */ set_cpu_online(cpu, true); - complete(&cpu_running); /* * Setup the percpu timer for this CPU. |