Seems to fix some occasional random lockups. The original TI code does something analagous to this.
Signed-off-by: David Shah dave@ds0.me --- arch/arm/mach-omap2/cpuidle44xx.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index de94173ce531..5b4befb1c5ae 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -110,6 +110,12 @@ static int omap_enter_idle_smp(struct cpuidle_device *dev, struct idle_statedata *cx = state_ptr + index; unsigned long flag;
+ /* Enter broadcast mode for periodic timers */ + tick_broadcast_enable(); + + /* Enter broadcast mode for one-shot timers */ + tick_broadcast_enter(); + raw_spin_lock_irqsave(&mpu_lock, flag); cx->mpu_state_vote++; if (cx->mpu_state_vote == num_online_cpus()) { @@ -126,6 +132,8 @@ static int omap_enter_idle_smp(struct cpuidle_device *dev, cx->mpu_state_vote--; raw_spin_unlock_irqrestore(&mpu_lock, flag);
+ tick_broadcast_exit(); + return index; }