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: <20221025123432.1227269-1-sudeep.holla@arm.com>
Date:   Tue, 25 Oct 2022 13:34:32 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Sudeep Holla <sudeep.holla@....com>,
        Amit Pundir <amit.pundir@...aro.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Andy Gross <agross@...nel.org>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>
Subject: [PATCH] PM: domains: Fix handling of unavailable/disabled idle states

Platforms can provide the information about the availability of each
idle states via status flag. Platforms may have to disable one or more
idle states for various reasons like broken firmware or other unmet
dependencies.

Fix handling of such unavailable/disabled idle states by ignoring them
while parsing the states.

Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Ulf Hansson <ulf.hansson@...aro.org>
Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing")
Signed-off-by: Sudeep Holla <sudeep.holla@....com>
---
 drivers/base/power/domain.c | 4 ++++
 1 file changed, 4 insertions(+)

Hi Ulf,

As you already know, this change alone doesn't fix the issue reported here[1].
It also needs the fixes you have posted [2].

Regards,
Sudeep

[1] https://lore.kernel.org/all/20221018145348.4051809-1-amit.pundir@linaro.org
[2] https://lore.kernel.org/all/20221021151013.148457-1-ulf.hansson@linaro.org

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index ead135c7044c..6471b559230e 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2952,6 +2952,10 @@ static int genpd_iterate_idle_states(struct device_node *dn,
 		np = it.node;
 		if (!of_match_node(idle_state_match, np))
 			continue;
+
+		if (!of_device_is_available(np))
+			continue;
+
 		if (states) {
 			ret = genpd_parse_state(&states[i], np);
 			if (ret) {
--
2.38.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ