mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] interconnect: qcom: Don't read back BCMs without an RPMh address
@ 2026-11-15 20:19 Venkat Yadlapati via B4 Relay
  2026-11-16 21:23 ` Neil Armstrong
  0 siblings, 1 reply; 2+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-15 20:19 UTC (permalink / raw)
  To: Georgi Djakov, Neil Armstrong, Abel Vesa
  Cc: linux-arm-msm, linux-pm, linux-kernel, Venkat Yadlapati

From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>

qcom_icc_rpmh_probe() ignores the return value of qcom_icc_bcm_init()
and reads the initial vote of every BCM back with rpmh_read(). When the
command DB has no entry for a BCM, qcom_icc_bcm_init() fails before
setting the address, so the read goes to RPMh address 0. On Molokai
(SM8845), whose command DB lacks the QPC0 BCM of the Kaanapali gem_noc,
that read never completes and every later RPMh request times out, so the
regulators fail to probe and the boot stalls:

  qnoc-kaanapali 31100000.interconnect: QPC0 could not find RPMh address
  qcom-rpmh-regulator 18900000.rsc:regulators-2: failed to read ENABLE status ret = -110
  Error sending AMC RPMH requests (-110)

Skip the read back for a BCM that failed to initialize, like before the
read back was added, when such a BCM was simply never voted.

Fixes: 11a44c6087c6 ("interconnect: qcom: implement get_bw with rpmh_read")
Assisted-by: LLM
Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
---
Found while bringing up the Motorola Signature (Qualcomm Molokai, SM8845)
on next-20261113: the boot stalled in the regulator probe and every RPMh
request timed out after the first one. The Molokai command DB has no QPC0
entry, so qcom_icc_bcm_init() fails for it, and the read back added in
commit 11a44c6087c6 then reads RPMh address 0, which never completes.

Tested on the Motorola Signature: no RPMh timeouts, the regulators and
the interconnect providers probe, and the rest of the boot is unchanged.

I used an LLM (Claude) to help write this patch and its commit message.
I reviewed it and tested the result on the device.
---
 drivers/interconnect/qcom/icc-rpmh.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c
index 4a2a746a4e59..1fbf4c960e1e 100644
--- a/drivers/interconnect/qcom/icc-rpmh.c
+++ b/drivers/interconnect/qcom/icc-rpmh.c
@@ -332,7 +332,9 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
 		return PTR_ERR(qp->voter);
 
 	for (i = 0; i < qp->num_bcms; i++) {
-		qcom_icc_bcm_init(qp->bcms[i], dev);
+		/* Don't read back a BCM without an RPMh address */
+		if (qcom_icc_bcm_init(qp->bcms[i], dev))
+			continue;
 		qcom_icc_bcm_get_bw(qp->voter, qp->bcms[i]);
 	}
 

---
base-commit: 3fd56a2833c22f62eb84297d0dbd47739632f1a0
change-id: 20261116-icc-bcm-readback-a339f8caeb09

Best regards,
--  
Venkat Yadlapati <venkat.yadlapati@yahoo.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-16 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15 20:19 [PATCH] interconnect: qcom: Don't read back BCMs without an RPMh address Venkat Yadlapati via B4 Relay
2026-11-16 21:23 ` Neil Armstrong

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®