diff options
author | Thomas Gleinxer <tglx@linutronix.de> | 2011-10-14 12:44:41 +0100 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-04-05 18:23:24 -0700 |
commit | 628b67d1738a74a4777277b72b65976ef377eea7 (patch) | |
tree | 7c0850918b88519ba6ed43e1406cbf78d9fb6b42 /arch/arm/kernel/smp.c | |
parent | 3c760aab7270140ed77f4fc08dbbd48c357a824e (diff) |
ARM: 7133/1: SMP: fix per cpu timer setup before the cpu is marked online
The problem is related to the early enabling of interrupts and the
per cpu timer setup before the cpu is marked online. This doesn't
need to be done in order to call calibrate_delay().
calibrate_delay() monitors jiffies, which are updated from the CPU
which is waiting for the new CPU to set the online bit.
So simply calibrate_delay() can be called on the new CPU just from
the interrupt disabled region and move the local timer setup after
stored the cpu data and before enabling interrupts.
This solves both the cpu_online vs. cpu_active problem and the
affinity setting of the per cpu timers.
Change-Id: I3ce734e674715f59d057a76821fc5f93706b875f
Signed-off-by: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/87227
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 1d0fa9cde229..31a129b46b0f 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -314,14 +314,19 @@ asmlinkage void __cpuinit secondary_start_kernel(void) * before we continue. */ set_cpu_online(cpu, true); - while (!cpu_active(cpu)) - cpu_relax(); /* * Setup the percpu timer for this CPU. */ percpu_timer_setup(); + while (!cpu_active(cpu)) + cpu_relax(); + + /* + * cpu_active bit is set, so it's safe to enalbe interrupts + * now. + */ local_irq_enable(); local_fiq_enable(); |