[PATCH] ARM: OMAP2+: pm34xx: add NEON wakeup dependency before clockdomain idle
Kevin Hilman (TI)
khilman at baylibre.com
Fri Nov 13 10:11:05 PST 2026
On OMAP3630 (BeagleBoard-xM), about one boot in three dies early when
a context switch touches the VFP, which traps as undefined.
The VFP is unreachable because NEON is powered off while the MPU runs.
omap3_pm_init() sets NEON's next state to OFF/RET and lets all
clockdomains idle before it adds the NEON -> MPU wakeup dependency, so
NEON can power down immediately and stay off until the MPU next idles.
This was visible in pm_debug, which showed neon_pwrdm OFF:1 while
mpu_pwrdm OFF:0.
Add the wakeup dependency before the clockdomains are allowed to idle.
Tested on omap3-beagle-xm: 6/17 boots crashed before, none of 25 after;
also ran 50 suspend/resume cycles each on omap3-beagle and -xm.
Fixes: fa3c2a4fc99f ("OMAP3: PM: handle PER/NEON/CORE in idle")
Reported-by: Andreas Kemnade <andreas at kemnade.info>
Closes: https://lore.kernel.org/r/20261028212302.75ec622e@kemnade.info
Signed-off-by: Kevin Hilman (TI) <khilman at baylibre.com>
---
This patch combined with an omap_device fix from Andreas makes OMAP3
very stable on suspend/resume, including off-mode for OMAP3630.
c.f. https://lore.kernel.org/r/20261110211531.679943-1-andreas@kemnade.info
---
arch/arm/mach-omap2/pm34xx.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 9992549c7336..d11967c2f4bf 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -510,6 +510,20 @@ int __init omap3_pm_init(void)
goto err3;
}
+ neon_clkdm = clkdm_lookup("neon_clkdm");
+ mpu_clkdm = clkdm_lookup("mpu_clkdm");
+ per_clkdm = clkdm_lookup("per_clkdm");
+ wkup_clkdm = clkdm_lookup("wkup_clkdm");
+
+ /*
+ * Add the NEON wakeup dependency on the MPU before the clockdomains
+ * are allowed to idle: once pwrdms_setup() has programmed NEON's next
+ * state to OFF/RET, an idle NEON clockdomain otherwise lets NEON power
+ * down while the MPU keeps running, and VFP instructions then trap as
+ * undefined until NEON is woken.
+ */
+ clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
+
(void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
@@ -523,11 +537,6 @@ int __init omap3_pm_init(void)
per_pwrdm = pwrdm_lookup("per_pwrdm");
core_pwrdm = pwrdm_lookup("core_pwrdm");
- neon_clkdm = clkdm_lookup("neon_clkdm");
- mpu_clkdm = clkdm_lookup("mpu_clkdm");
- per_clkdm = clkdm_lookup("per_clkdm");
- wkup_clkdm = clkdm_lookup("wkup_clkdm");
-
omap_common_suspend_init(omap3_pm_suspend);
arm_pm_idle = omap3_pm_idle;
@@ -562,7 +571,6 @@ int __init omap3_pm_init(void)
if (IS_PM34XX_ERRATUM(PM_PER_MEMORIES_ERRATUM_i582))
clkdm_add_wkdep(per_clkdm, wkup_clkdm);
- clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
omap3_secure_ram_storage =
kmalloc(OMAP3_SAVE_SECURE_RAM_SZ, GFP_KERNEL);
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261113-wip-omap3-vfp-neon-mismatch-ae585c1e8fe0
Best regards,
--
Kevin Hilman (TI) <khilman at baylibre.com>
More information about the linux-arm-kernel
mailing list