* [PATCH 1/2] ARM: omap: cpuidle34xx: balance cpu_pm_enter/exit()
2026-10-28 19:15 [PATCH 0/2] ARM: omap: cpuidle34xx: Fix unbalanced cpu_pm_enter()/exit() and cleanup Andreas Kemnade
@ 2026-10-28 19:15 ` Andreas Kemnade
2026-10-28 20:27 ` Andreas Kemnade
2026-10-28 19:15 ` [PATCH 2/2] ARM: omap: cpuidle34xx: Constify state info Andreas Kemnade
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Kemnade @ 2026-10-28 19:15 UTC (permalink / raw)
To: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren, Russell King
Cc: linux-omap, linux-arm-kernel, linux-kernel, Andreas Kemnade
These calls are usually done in a balanced way, so allow notifiers to
assume that these calls are balanced under all circumstances.
Seen some spurios vfp issues probably connected to this.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/mach-omap2/cpuidle34xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 2ab5dcbfb7f6..e42dcf8c03a3 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -139,8 +139,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
* Call idle CPU PM enter notifier chain to restore
* VFP context.
*/
- if (cx->mpu_state == PWRDM_POWER_OFF &&
- pwrdm_read_prev_pwrst(mpu_pd) == PWRDM_POWER_OFF)
+ if (cx->mpu_state == PWRDM_POWER_OFF)
cpu_pm_exit();
out_clkdm_set:
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] ARM: omap: cpuidle34xx: Constify state info
2026-10-28 19:15 [PATCH 0/2] ARM: omap: cpuidle34xx: Fix unbalanced cpu_pm_enter()/exit() and cleanup Andreas Kemnade
2026-10-28 19:15 ` [PATCH 1/2] ARM: omap: cpuidle34xx: balance cpu_pm_enter/exit() Andreas Kemnade
@ 2026-10-28 19:15 ` Andreas Kemnade
1 sibling, 0 replies; 4+ messages in thread
From: Andreas Kemnade @ 2026-10-28 19:15 UTC (permalink / raw)
To: Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren, Russell King
Cc: linux-omap, linux-arm-kernel, linux-kernel, Andreas Kemnade
omap3_idle_statedata is only static read only data,
so have that fact cleary visible.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
arch/arm/mach-omap2/cpuidle34xx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index e42dcf8c03a3..16d2e1f08b48 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -58,7 +58,7 @@ static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
* Prevent PER OFF if CORE is not in RETention or OFF as this would
* disable PER wakeups completely.
*/
-static struct omap3_idle_statedata omap3_idle_data[] = {
+static const struct omap3_idle_statedata omap3_idle_data[] = {
{
.mpu_state = PWRDM_POWER_ON,
.core_state = PWRDM_POWER_ON,
@@ -108,7 +108,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- struct omap3_idle_statedata *cx = &omap3_idle_data[index];
+ const struct omap3_idle_statedata *cx = &omap3_idle_data[index];
int error;
if (omap_irq_pending() || need_resched())
@@ -168,7 +168,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
static int next_valid_state(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
- struct omap3_idle_statedata *cx = &omap3_idle_data[index];
+ const struct omap3_idle_statedata *cx = &omap3_idle_data[index];
u32 mpu_deepest_state = PWRDM_POWER_RET;
u32 core_deepest_state = PWRDM_POWER_RET;
int idx;
@@ -221,7 +221,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
{
int new_state_idx, ret;
u8 per_next_state, per_saved_state;
- struct omap3_idle_statedata *cx;
+ const struct omap3_idle_statedata *cx;
/*
* Use only C1 if CAM is active.
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread