lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240822224547.385095-1-ulf.hansson@linaro.org>
Date: Fri, 23 Aug 2024 00:45:37 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Viresh Kumar <vireshk@...nel.org>,
	Nishanth Menon <nm@...com>,
	Stephen Boyd <sboyd@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <quic_kdybcio@...cinc.com>,
	Nikunj Kela <nkela@...cinc.com>,
	Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Mikko Perttunen <mperttunen@...dia.com>,
	Jonathan Hunter <jonathanh@...dia.com>,
	Stephan Gerhold <stephan@...hold.net>,
	Ilia Lin <ilia.lin@...nel.org>,
	Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
	Vikash Garodia <quic_vgarodia@...cinc.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	linux-pm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH v3 00/10] OPP/pmdomain: Assign required_devs for required OPPs through genpd

Changes in v3:
	- Combine the two series [1] and [2] into one.
	- A few minor changes to consumer drivers.
	- Clarification in commit messages.

Through dev_pm_opp_set_config() the _opp_attach_genpd() allows consumer
drivers to attach a device to its PM domains. Their corresponding virtual
devices that are created by genpd during attach, are later being assigned
as the required_devs for the corresponding required OPPs. In principle,
using dev_pm_opp_set_config() for this works fine.

However, attaching a device to its PM domains is in general better done
with dev_pm_domain_attach|detach_list(). To avoid having two different ways
to manage this, this series prepare for the removal of _opp_attach_genpd().

Moreover, it converts the few existing users of the _opp_attach_genpd() into
dev|devm__pm_domain_attach(), allowing the final patch to drop the redundant
code that becomes redundant.

To test this, I have used a QEMU setup, with local PM test-drivers to try to
test all various combinations of single/multi power/performance PM domains for
a device. Hopefully I have covered it all, but I would certainly appreciate if
someone could help to run a slew of tests on some HWs.

Note, due to dependencies I think this whole series is best funneled together
through my pmdomain tree. If you think there may be issues with this approach,
please let me know so we can figure out the best merging strategy.

Kind regards
Ulf Hansson

[1]
https://lore.kernel.org/all/20240718234319.356451-1-ulf.hansson@linaro.org/
[2]
https://lore.kernel.org/all/20240723144610.564273-1-ulf.hansson@linaro.org/


Ulf Hansson (10):
  OPP: Fix support for required OPPs for multiple PM domains
  OPP: Rework _set_required_devs() to manage a single device per call
  pmdomain: core: Manage the default required OPP from a separate
    function
  OPP/pmdomain: Set the required_dev for a required OPP during genpd
    attach
  pmdomain: core: Drop the redundant dev_to_genpd_dev()
  OPP: Drop redundant code in _link_required_opps()
  drm/tegra: gr3d: Convert into devm_pm_domain_attach_list()
  media: venus: Convert into devm_pm_domain_attach_list() for OPP PM
    domain
  cpufreq: qcom-nvmem: Convert to dev_pm_domain_attach|detach_list()
  OPP: Drop redundant _opp_attach|detach_genpd()

 drivers/cpufreq/qcom-cpufreq-nvmem.c          |  79 ++----
 drivers/gpu/drm/tegra/gr3d.c                  |  38 +--
 drivers/media/platform/qcom/venus/core.c      |   8 +-
 drivers/media/platform/qcom/venus/core.h      |   6 +-
 .../media/platform/qcom/venus/pm_helpers.c    |  44 +--
 drivers/opp/core.c                            | 252 ++++++------------
 drivers/opp/of.c                              |  39 +--
 drivers/opp/opp.h                             |   5 +-
 drivers/pmdomain/core.c                       | 107 ++++++--
 include/linux/pm_domain.h                     |   6 -
 include/linux/pm_opp.h                        |  42 +--
 11 files changed, 217 insertions(+), 409 deletions(-)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ