From: Reza Kurniawan <imkyufie@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Ulf Hansson <ulfh@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Christian Loehle <christian.loehle@arm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>, Val Packett <val@packett.cool>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Alejandro Tafalla <atafalla@dnyon.com>,
Reza Kurniawan <imkyufie@gmail.com>
Subject: [PATCH v2 2/4] cpuidle: psci: Allow skipping the suspend mode switch
Date: Sun, 18 Oct 2026 04:29:22 +0000 [thread overview]
Message-ID: <20261018-psci-fix-v2-2-35f65b59eb9a@gmail.com> (raw)
In-Reply-To: <20261018-psci-fix-v2-0-35f65b59eb9a@gmail.com>
From: Alejandro Tafalla <atafalla@dnyon.com>
On some SoCs (e.g. Qualcomm MSM8917 and MSM8937), PSCI reports that OSI
mode is supported but rejects any PSCI_SET_SUSPEND_MODE call with
NOT_SUPPORTED. psci_set_osi_mode() then fails with -EOPNOTSUPP and the
probe is aborted:
psci-cpuidle-domain psci: probe with driver psci-cpuidle-domain failed
with error -95
Add support for the "skip-suspend-mode-switch" property. When present,
do not call psci_set_osi_mode() and continue with the topology that was
already built.
Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
[Reza Kurniawan: split out the patch, added log message for skip case, renamed
the property, added property check at PSCI initialization]
Co-developed-by: Reza Kurniawan <imkyufie@gmail.com>
Signed-off-by: Reza Kurniawan <imkyufie@gmail.com>
---
drivers/cpuidle/cpuidle-psci-domain.c | 16 ++++++++++------
drivers/firmware/psci/psci.c | 6 ++++--
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c
index 5722365b94..cc9f14769b 100644
--- a/drivers/cpuidle/cpuidle-psci-domain.c
+++ b/drivers/cpuidle/cpuidle-psci-domain.c
@@ -159,13 +159,17 @@ static int psci_cpuidle_domain_probe(struct platform_device *pdev)
if (ret)
goto remove_pd;
- /* let's try to enable OSI. */
- ret = psci_set_osi_mode(use_osi);
- if (ret)
- goto remove_pd;
+ if (of_property_read_bool(np, "skip-suspend-mode-switch")) {
+ pr_info("Initialized CPU PM domain topology, keeping firmware-set mode\n");
+ } else {
+ ret = psci_set_osi_mode(use_osi);
+ if (ret)
+ goto remove_pd;
+
+ pr_info("Initialized CPU PM domain topology using %s mode\n",
+ use_osi ? "OSI" : "PC");
+ }
- pr_info("Initialized CPU PM domain topology using %s mode\n",
- use_osi ? "OSI" : "PC");
return 0;
remove_pd:
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index e73bae6cb2..3226af6d89 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -791,8 +791,10 @@ static int __init psci_1_0_init(const struct device_node *np)
if (psci_has_osi_support()) {
pr_info("OSI mode supported.\n");
- /* Default to PC mode. */
- psci_set_osi_mode(false);
+ if (!of_property_read_bool(np, "skip-suspend-mode-switch")) {
+ /* Default to PC mode. */
+ psci_set_osi_mode(false);
+ }
}
return 0;
--
2.55.0
next prev parent reply other threads:[~2026-10-18 4:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 4:29 [PATCH v2 0/4] Fix PSCI on MSM8917 and MSM8937 Reza Kurniawan
2026-10-18 4:29 ` [PATCH v2 1/4] dt-bindings: arm: psci: Add skip-suspend-mode-switch property Reza Kurniawan
2026-10-18 4:29 ` Reza Kurniawan [this message]
2026-10-18 4:29 ` [PATCH v2 3/4] arm64: dts: qcom: Skip suspend mode switch on MSM8917 and MSM8937 Reza Kurniawan
2026-10-18 4:29 ` [PATCH v2 4/4] arm64: dts: qcom: msm8917: Use a shallower cluster state to fix unresponsive idle Reza Kurniawan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261018-psci-fix-v2-2-35f65b59eb9a@gmail.com \
--to=imkyufie@gmail.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=atafalla@dnyon.com \
--cc=christian.loehle@arm.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=ulfh@kernel.org \
--cc=val@packett.cool \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox