Skip to content

Commit 1a67b92

Browse files
Ulf Hanssonrafaeljw
authored andcommitted
ARM: imx6q: Fixup RCU usage for cpuidle
The commit eb1f002 ("lockdep,trace: Expose tracepoints"), started to expose us for tracepoints. For imx6q cpuidle, this leads to an RCU splat according to below. [6.870684] [<c0db7690>] (_raw_spin_lock) from [<c011f6a4>] (imx6q_enter_wait+0x18/0x9c) [6.878846] [<c011f6a4>] (imx6q_enter_wait) from [<c09abfb0>] (cpuidle_enter_state+0x168/0x5e4) To fix the problem, let's assign the corresponding idlestate->flags the CPUIDLE_FLAG_RCU_IDLE bit, which enables us to call rcu_idle_enter|exit() at the proper point. Reported-by: Dong Aisheng <aisheng.dong@nxp.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent eac53b3 commit 1a67b92

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/arm/mach-imx/cpuidle-imx6q.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ static int imx6q_enter_wait(struct cpuidle_device *dev,
2424
imx6_set_lpm(WAIT_UNCLOCKED);
2525
raw_spin_unlock(&cpuidle_lock);
2626

27+
rcu_idle_enter();
2728
cpu_do_idle();
29+
rcu_idle_exit();
2830

2931
raw_spin_lock(&cpuidle_lock);
3032
if (num_idle_cpus-- == num_online_cpus())
@@ -44,7 +46,7 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
4446
{
4547
.exit_latency = 50,
4648
.target_residency = 75,
47-
.flags = CPUIDLE_FLAG_TIMER_STOP,
49+
.flags = CPUIDLE_FLAG_TIMER_STOP | CPUIDLE_FLAG_RCU_IDLE,
4850
.enter = imx6q_enter_wait,
4951
.name = "WAIT",
5052
.desc = "Clock off",

0 commit comments

Comments
 (0)