From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
"Paul E . McKenney" <paulmck@kernel.org>,
Russell King <rmk+kernel@armlinux.org.uk>,
Sasha Levin <sashal@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 03/19] ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled
Date: Mon, 8 Feb 2021 12:58:42 -0500 [thread overview]
Message-ID: <20210208175858.2092008-3-sashal@kernel.org> (raw)
In-Reply-To: <20210208175858.2092008-1-sashal@kernel.org>
From: Tony Lindgren <tony@atomide.com>
[ Upstream commit 06862d789ddde8a99c1e579e934ca17c15a84755 ]
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 1098582a0f6c ("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 50d6b3cf9403 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/mach-omap2/cpuidle44xx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index c8d317fafe2ea..de37027ad7587 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -151,10 +151,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
(cx->mpu_logic_state == PWRDM_POWER_OFF);
/* Enter broadcast mode for periodic timers */
- tick_broadcast_enable();
+ RCU_NONIDLE(tick_broadcast_enable());
/* Enter broadcast mode for one-shot timers */
- tick_broadcast_enter();
+ RCU_NONIDLE(tick_broadcast_enter());
/*
* Call idle CPU PM enter notifier chain so that
@@ -166,7 +166,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
if (dev->cpu == 0) {
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
- omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
+ RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
/*
* Call idle CPU cluster PM enter notifier chain
@@ -178,7 +178,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
index = 0;
cx = state_ptr + index;
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
- omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
+ RCU_NONIDLE(omap_set_pwrdm_state(mpu_pd, cx->mpu_state));
mpuss_can_lose_context = 0;
}
}
@@ -194,9 +194,9 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
mpuss_can_lose_context)
gic_dist_disable();
- clkdm_deny_idle(cpu_clkdm[1]);
- omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON);
- clkdm_allow_idle(cpu_clkdm[1]);
+ RCU_NONIDLE(clkdm_deny_idle(cpu_clkdm[1]));
+ RCU_NONIDLE(omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON));
+ RCU_NONIDLE(clkdm_allow_idle(cpu_clkdm[1]));
if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
mpuss_can_lose_context) {
@@ -222,7 +222,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
cpu_pm_exit();
cpu_pm_out:
- tick_broadcast_exit();
+ RCU_NONIDLE(tick_broadcast_exit());
fail:
cpuidle_coupled_parallel_barrier(dev, &abort_barrier);
--
2.27.0
next prev parent reply other threads:[~2021-02-08 19:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 17:58 [PATCH AUTOSEL 5.4 01/19] arm64: dts: rockchip: Fix PCIe DT properties on rk3399 Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 02/19] arm64: dts: qcom: sdm845: Reserve LPASS clocks in gcc Sasha Levin
2021-02-08 17:58 ` Sasha Levin [this message]
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 04/19] Input: xpad - sync supported devices with fork on GitHub Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 05/19] platform/x86: hp-wmi: Disable tablet-mode reporting by default Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 06/19] ovl: perform vfs_getxattr() with mounter creds Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 07/19] cap: fix conversions on getxattr Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 08/19] ovl: skip getxattr of security labels Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 09/19] nvme-pci: ignore the subsysem NQN on Phison E16 Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 10/19] drm/amd/display: Add more Clock Sources to DCN2.1 Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 11/19] drm/amd/display: Fix dc_sink kref count in emulated_link_detect Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 12/19] drm/amd/display: Free atomic state after drm_atomic_commit Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 13/19] drm/amd/display: Decrement refcount of dc_sink before reassignment Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 14/19] riscv: virt_addr_valid must check the address belongs to linear mapping Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 15/19] bfq-iosched: Revert "bfq: Fix computation of shallow depth" Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 16/19] ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 17/19] ARM: ensure the signal page contains defined contents Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 18/19] ARM: kexec: fix oops after TLB are invalidated Sasha Levin
2021-02-08 17:58 ` [PATCH AUTOSEL 5.4 19/19] init/gcov: allow CONFIG_CONSTRUCTORS on UML to fix module gcov Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208175858.2092008-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=stable@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®