From: Alexandre Rapaille via B4 Relay <devnull+arapaille.atlr-engineering.com@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Val Packett <val@packett.cool>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Luca Weiss <luca@lucaweiss.eu>
Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Luca Weiss <luca.weiss@fairphone.com>,
Alexandre Rapaille <arapaille@atlr-engineering.com>,
stable@vger.kernel.org
Subject: [PATCH 1/2] remoteproc: qcom_wcnss: Request the MX and PX regulators on pronto-v1/v2
Date: Wed, 02 Dec 2026 14:49:20 +0100 [thread overview]
Message-ID: <20261202-pronto-v1-send-v1-1-dff86afc652f@atlr-engineering.com> (raw)
In-Reply-To: <20261202-pronto-v1-send-v1-0-dff86afc652f@atlr-engineering.com>
From: Alexandre Rapaille <arapaille@atlr-engineering.com>
The pronto-v3 check added by commit 3dbc90b9c22e ("remoteproc:
qcom_wcnss: Fix handling the lack of PD regulators in v3") compares the
number of power domain names with num_vregs, which counts only the
non-PD regulators. On pronto-v1/v2 that is 2 >= 1, so the PD regulators
are skipped there too: the driver requests only the first entry,
"vddcx" (a dummy when CX is a power domain), and never votes VDD_MX or
VDD_PX.
Only skip when the vregs list has no PD regulators. Reverting that commit
would bring back the pronto-v3 out-of-bounds read it fixed.
Fixes: 3dbc90b9c22e ("remoteproc: qcom_wcnss: Fix handling the lack of PD regulators in v3")
Cc: stable@vger.kernel.org
Signed-off-by: Alexandre Rapaille <arapaille@atlr-engineering.com>
---
drivers/remoteproc/qcom_wcnss.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 02f38fe29f20..e73c4ed0b513 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -445,19 +445,15 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
{
const struct wcnss_vreg_info *info = data->vregs;
struct regulator_bulk_data *bulk;
- size_t i, possible_pds = 0, num_vregs = data->num_vregs;
+ size_t i, num_vregs = data->num_vregs;
int ret;
- for (i = 0; i < WCNSS_MAX_PDS; i++)
- if (data->pd_names[i])
- possible_pds++;
-
/*
* If attaching the power domains suceeded we can skip requesting
* the regulators for the power domains. For old device trees we need to
* reserve extra space to manage them through the regulator interface.
*/
- if (possible_pds >= num_vregs) {
+ if (!data->num_pd_vregs) {
/* Do nothing if vregs do not include PD regulators (pronto-v3) */
} else if (wcnss->num_pds) {
info += wcnss->num_pds;
--
2.43.0
next prev parent reply other threads:[~2026-12-02 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 13:49 [PATCH 0/2] remoteproc: qcom_wcnss: Vote VDD_MX/VDD_PX again " Alexandre Rapaille via B4 Relay
2026-12-02 13:49 ` Alexandre Rapaille via B4 Relay [this message]
2026-12-02 13:49 ` [PATCH 2/2] ARM: dts: qcom: msm8974: Use pronto-v1 for the WCNSS remoteproc Alexandre Rapaille via B4 Relay
2026-12-02 13:53 ` Luca Weiss
2026-12-02 14:01 ` Alexandre Rapaille
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=20261202-pronto-v1-send-v1-1-dff86afc652f@atlr-engineering.com \
--to=devnull+arapaille.atlr-engineering.com@kernel.org \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=arapaille@atlr-engineering.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=luca@lucaweiss.eu \
--cc=mathieu.poirier@linaro.org \
--cc=robh@kernel.org \
--cc=stable@vger.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
all inboxes | Powered by JetHome®