* [PATCH] ARM: OMAP2+: pm34xx: add NEON wakeup dependency before clockdomain idle
@ 2026-11-13 18:11 Kevin Hilman (TI)
2026-11-13 22:06 ` Andreas Kemnade
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hilman (TI) @ 2026-11-13 18:11 UTC (permalink / raw)
To: Andreas Kemnade, linux-omap
Cc: Aaro Koskinen, Roger Quadros, linux-arm-kernel
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@kemnade.info>
Closes: https://lore.kernel.org/r/20261028212302.75ec622e@kemnade.info
Signed-off-by: Kevin Hilman (TI) <khilman@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@baylibre.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: OMAP2+: pm34xx: add NEON wakeup dependency before clockdomain idle
2026-11-13 18:11 [PATCH] ARM: OMAP2+: pm34xx: add NEON wakeup dependency before clockdomain idle Kevin Hilman (TI)
@ 2026-11-13 22:06 ` Andreas Kemnade
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Kemnade @ 2026-11-13 22:06 UTC (permalink / raw)
To: Kevin Hilman (TI)
Cc: linux-omap, Aaro Koskinen, Roger Quadros, linux-arm-kernel
On Fri, 13 Nov 2026 10:11:05 -0800
"Kevin Hilman (TI)" <khilman@baylibre.com> wrote:
> 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@kemnade.info>
> Closes: https://lore.kernel.org/r/20261028212302.75ec622e@kemnade.info
> Signed-off-by: Kevin Hilman (TI) <khilman@baylibre.com>
survived a git bisect + several other boots on GTA04. (tested the identical
change in a comment before)
Tested-by: Andreas Kemnade <andreas@kemnade.info> # GTA04
> ---
> 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@baylibre.com>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-13 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 18:11 [PATCH] ARM: OMAP2+: pm34xx: add NEON wakeup dependency before clockdomain idle Kevin Hilman (TI)
2026-11-13 22:06 ` Andreas Kemnade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox