[PATCH 0/2] cpuidle/pmdomain: Correctly track state of excluded CPU clusters
Maulik Shah
maulik.shah at oss.qualcomm.com
Mon Aug 10 22:50:00 PDT 2026
When CPUs in a cluster are excluded at boot (e.g. via maxcpus=N), their
CPU-cluster genpd is never really powered off, and its reported
idle-state index never reflects the deepest state either. Both issues
independently prevent the parent domain from ever powering off, even
though the excluded clusters never ran any CPU.
Patch 1 addresses the domain status: psci_pd_init() always calls
pm_genpd_init() with is_off=false, so a CPU-cluster genpd is marked ON
at creation regardless of whether any CPU in it has actually powered it
on. For clusters whose CPUs never come online, nothing ever transitions
the domain to OFF afterwards, so it is stuck reporting ON forever. This
patch starts the domain OFF at creation when OSI is in use, since
dt_idle_attach_cpu() and the cpuhp callbacks already power it on
correctly for any CPU that is or becomes online.
Patch 2 addresses the idle-state index for domains that start OFF: even
after patch 1, a domain that starts OFF without ever going through an
actual power-off sequence is left with state_idx=0 (its kzalloc'd
value), i.e. reported as parked at its shallowest idle state instead of
its deepest one. genpd_power_off()/genpd_sync_power_off() gate parent
power-off on every child being at its deepest state index, so these
domains still block the parent from powering off, even though they are
genuinely off. This patch sets state_idx to the deepest state whenever
a domain is initialised OFF, addressing the root cause for every
is_off=true caller of pm_genpd_init(), not just PSCI CPU clusters.
Together, these two patches let the parent domain power off normally
on systems such as hamoa when booted with maxcpus=N, allowing the
deepest system-level low-power mode (SS3) to be entered.
The two patches address independent gaps and have no hard dependency
on each other; either can be merged on its own or in either order.
Signed-off-by: Maulik Shah <maulik.shah at oss.qualcomm.com>
---
Maulik Shah (2):
cpuidle: psci: Start CPU-cluster pmdomain OFF when OSI is used
pmdomain: core: Initialize state_idx to deepest state for OFF domains
drivers/cpuidle/cpuidle-psci-domain.c | 14 +++++++++++++-
drivers/pmdomain/core.c | 2 ++
2 files changed, 15 insertions(+), 1 deletion(-)
---
base-commit: 6b8c8af514d739d0335f5579b585e02babe8a727
change-id: 20260811-domain_off_ss3-ce65171c1416
Best regards,
--
Maulik Shah <maulik.shah at oss.qualcomm.com>
More information about the linux-arm-kernel
mailing list