[Letux-kernel] [PATCH] omap5: Enable tick broadcasts in low power mode

David Shah dave at ds0.me
Wed Aug 5 17:59:28 CEST 2020


Seems to fix some occasional random lockups. The original TI code does something analagous to this.

Signed-off-by: David Shah <dave at 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;
 }
 
-- 
2.27.0



More information about the Letux-kernel mailing list