diff options
author | 2025-07-01 13:47:23 +0200 | |
---|---|---|
committer | 2025-07-09 13:29:53 +0200 | |
commit | 13a4b7fb62600e1c0738fdb0b7176555ff05aadf (patch) | |
tree | 45acd16c63322c7c8e25bc9e6374014fe0031e79 /include/linux | |
parent | pmdomain: core: Default to use of_genpd_sync_state() for genpd providers (diff) | |
download | wireguard-linux-13a4b7fb62600e1c0738fdb0b7176555ff05aadf.tar.xz wireguard-linux-13a4b7fb62600e1c0738fdb0b7176555ff05aadf.zip |
pmdomain: core: Leave powered-on genpds on until late_initcall_sync
Powering-off a genpd that was on during boot, before all of its consumer
devices have been probed, is certainly prone to problems.
As a step to improve this situation, let's prevent these genpds from being
powered-off until genpd_power_off_unused() gets called, which is a
late_initcall_sync().
Note that, this still doesn't guarantee that all the consumer devices has
been probed before we allow to power-off the genpds. Yet, this should be a
step in the right direction.
Suggested-by: Saravana Kannan <saravanak@google.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Colibri iMX8X
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> # TI AM62A,Xilinx ZynqMP ZCU106
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250701114733.636510-22-ulf.hansson@linaro.org
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pm_domain.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index d68e07dadc99..99556589f45e 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -199,6 +199,7 @@ struct generic_pm_domain { unsigned int performance_state; /* Aggregated max performance state */ cpumask_var_t cpus; /* A cpumask of the attached CPUs */ bool synced_poweroff; /* A consumer needs a synced poweroff */ + bool stay_on; /* Stay powered-on during boot. */ enum genpd_sync_state sync_state; /* How sync_state is managed. */ int (*power_off)(struct generic_pm_domain *domain); int (*power_on)(struct generic_pm_domain *domain); |