Skip to content

Commit 06862d7

Browse files
committed
ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled
We get suspcious RCU usage splats with cpuidle in several places in omap_enter_idle_coupled() with the kernel debug options enabled: RCU used illegally from extended quiescent state! ... (_raw_spin_lock_irqsave) (omap_enter_idle_coupled+0x17c/0x2d8) (omap_enter_idle_coupled) (cpuidle_enter_state) (cpuidle_enter_state_coupled) (cpuidle_enter) Let's use RCU_NONIDLE to suppress these splats. Things got changed around with commit 1098582 ("sched,idle,rcu: Push rcu_idle deeper into the idle path") that started triggering these warnings. For the tick_broadcast related calls, ideally we'd just switch over to using CPUIDLE_FLAG_TIMER_STOP for omap_enter_idle_coupled() to have the generic cpuidle code handle the tick_broadcast related calls for us and then just drop the tick_broadcast calls here. But we're currently missing the call in the common cpuidle code for tick_broadcast_enable() that CPU1 hotplug needs as described in earlier commit 50d6b3c ("ARM: OMAP2+: fix lack of timer interrupts on CPU1 after hotplug"). Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Paul E. McKenney <paulmck@kernel.org> Cc: Russell King <rmk+kernel@armlinux.org.uk> Acked-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 5c8fe58 commit 06862d7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

arch/arm/mach-omap2/cpuidle44xx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
151151
(cx->mpu_logic_state == PWRDM_POWER_OFF);
152152

153153
/* Enter broadcast mode for periodic timers */
154-
tick_broadcast_enable();
154+
RCU_NONIDLE(tick_broadcast_enable());
155155

156156
/* Enter broadcast mode for one-shot timers */
157-
tick_broadcast_enter();
157+
RCU_NONIDLE(tick_broadcast_enter());
158158

159159
/*
160160
* Call idle CPU PM enter notifier chain so that
@@ -166,7 +166,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
166166

167167
if (dev->cpu == 0) {
168168
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
169-
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
169+
RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
170170

171171
/*
172172
* Call idle CPU cluster PM enter notifier chain
@@ -178,7 +178,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
178178
index = 0;
179179
cx = state_ptr + index;
180180
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
181-
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
181+
RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
182182
mpuss_can_lose_context = 0;
183183
}
184184
}
@@ -194,9 +194,9 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
194194
mpuss_can_lose_context)
195195
gic_dist_disable();
196196

197-
clkdm_deny_idle(cpu_clkdm[1]);
198-
omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON);
199-
clkdm_allow_idle(cpu_clkdm[1]);
197+
RCU_NONIDLE(clkdm_deny_idle(cpu_clkdm[1]));
198+
RCU_NONIDLE(omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON));
199+
RCU_NONIDLE(clkdm_allow_idle(cpu_clkdm[1]));
200200

201201
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
202202
mpuss_can_lose_context) {
@@ -222,7 +222,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
222222
cpu_pm_exit();
223223

224224
cpu_pm_out:
225-
tick_broadcast_exit();
225+
RCU_NONIDLE(tick_broadcast_exit());
226226

227227
fail:
228228
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);

0 commit comments

Comments
 (0)