mbox series

[RFC,v4,0/2] PM: domain: Support skiping disabling unused domains until sync state

Message ID 20230505150241.3469424-1-abel.vesa@linaro.org
Headers show
Series PM: domain: Support skiping disabling unused domains until sync state | expand

Message

Abel Vesa May 5, 2023, 3:02 p.m. UTC
This is another try at making the unused domain remain enabled until
sync state of the provider. There have been already few attempts.
Last one is [1]. This new approach comes after a discussion on the
mentioned mail thread with Saravana and Ulf. The suggestion there was to
move this to the genpd core. This new approach, first is adding the
support for 'unknown' initial state of a domain, then uses 'boot status'
to make decisions whether to power off a unused domain on late initcall
or assume it will be powered off on the provider's sync state callback,
if it has one registered. In order to make use of the newly added
'unknown' state, we need to update all the calls to pm_genpd_init to
pass one of the 'on', 'off' or 'unknown' states.

[1] https://lore.kernel.org/r/20230327193829.3756640-1-abel.vesa@linaro.org

Abel Vesa (2):
  PM: domains: Expand initial state of domain to support unknown state
  PM: domains: Skip disabling unused until sync state

 arch/arm/mach-s3c/pm-s3c64xx.c             |  4 +-
 arch/arm/mach-ux500/pm_domains.c           |  2 +-
 drivers/base/power/domain.c                | 62 +++++++++++++++++++---
 drivers/clk/davinci/psc.c                  |  3 +-
 drivers/clk/mmp/pwr-island.c               |  2 +-
 drivers/clk/qcom/gdsc.c                    |  2 +-
 drivers/clk/renesas/clk-mstp.c             |  2 +-
 drivers/clk/renesas/r9a06g032-clocks.c     |  2 +-
 drivers/clk/renesas/renesas-cpg-mssr.c     |  2 +-
 drivers/clk/renesas/rzg2l-cpg.c            |  2 +-
 drivers/cpuidle/cpuidle-psci-domain.c      |  2 +-
 drivers/cpuidle/cpuidle-riscv-sbi.c        |  2 +-
 drivers/firmware/arm_scmi/scmi_pm_domain.c |  2 +-
 drivers/firmware/imx/scu-pd.c              |  3 +-
 drivers/firmware/scpi_pm_domain.c          |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c    |  2 +-
 drivers/irqchip/irq-qcom-mpm.c             |  2 +-
 drivers/soc/actions/owl-sps.c              |  2 +-
 drivers/soc/amlogic/meson-ee-pwrc.c        |  7 +--
 drivers/soc/amlogic/meson-gx-pwrc-vpu.c    |  3 +-
 drivers/soc/amlogic/meson-secure-pwrc.c    |  5 +-
 drivers/soc/apple/apple-pmgr-pwrstate.c    |  2 +-
 drivers/soc/bcm/bcm2835-power.c            |  2 +-
 drivers/soc/bcm/bcm63xx/bcm-pmb.c          |  2 +-
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c    |  3 +-
 drivers/soc/bcm/raspberrypi-power.c        |  2 +-
 drivers/soc/dove/pmu.c                     |  4 +-
 drivers/soc/imx/gpc.c                      |  4 +-
 drivers/soc/imx/gpcv2.c                    |  2 +-
 drivers/soc/imx/imx8m-blk-ctrl.c           |  2 +-
 drivers/soc/imx/imx8mp-blk-ctrl.c          |  2 +-
 drivers/soc/imx/imx93-blk-ctrl.c           |  2 +-
 drivers/soc/imx/imx93-pd.c                 |  3 +-
 drivers/soc/mediatek/mtk-pm-domains.c      |  4 +-
 drivers/soc/mediatek/mtk-scpsys.c          |  2 +-
 drivers/soc/qcom/cpr.c                     |  2 +-
 drivers/soc/qcom/rpmhpd.c                  |  2 +-
 drivers/soc/qcom/rpmpd.c                   |  2 +-
 drivers/soc/renesas/rcar-gen4-sysc.c       |  2 +-
 drivers/soc/renesas/rcar-sysc.c            |  2 +-
 drivers/soc/renesas/rmobile-sysc.c         |  2 +-
 drivers/soc/rockchip/pm_domains.c          |  3 +-
 drivers/soc/samsung/pm_domains.c           |  2 +-
 drivers/soc/starfive/jh71xx_pmu.c          |  3 +-
 drivers/soc/sunxi/sun20i-ppu.c             |  6 ++-
 drivers/soc/tegra/pmc.c                    |  5 +-
 drivers/soc/tegra/powergate-bpmp.c         |  3 +-
 drivers/soc/ti/omap_prm.c                  |  2 +-
 drivers/soc/ti/ti_sci_pm_domains.c         |  2 +-
 drivers/soc/xilinx/zynqmp_pm_domains.c     |  2 +-
 include/linux/pm_domain.h                  | 12 ++++-
 51 files changed, 140 insertions(+), 63 deletions(-)