mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] remoteproc: qcom_q6v5_pas: Fix unbalanced enable for handover IRQ after attach
@ 2026-08-28 18:13 Mukesh Ojha
  2026-08-28 18:13 ` [PATCH 2/3] remoteproc: qcom_q6v5: Skip handover callback if already issued Mukesh Ojha
  2026-08-28 18:13 ` [PATCH 3/3] remoteproc: qcom_q6v5_pas: Add per-PD proxy performance states for Hawi CDSP Mukesh Ojha
  0 siblings, 2 replies; 11+ messages in thread
From: Mukesh Ojha @ 2026-08-28 18:13 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Jingyi Wang,
	Gokul Krishna Krishnakumar
  Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Mukesh Ojha

qcom_pas_attach() calls enable_irq() directly for subsystems already
running at kernel probe time, but never sets handover_irq_enabled.
This leaves the IRQ physically enabled with the tracking flag false.

On the first stop+restart cycle, qcom_q6v5_unprepare() consults
handover_irq_enabled, finds it false, and skips the disable_irq_nosync()
call—leaving the IRQ enabled. When qcom_q6v5_prepare() then calls
enable_irq() on the already-enabled IRQ (depth=0), the kernel emits:

  WARNING: Unbalanced enable for IRQ 239

Fix by mirroring the enable_irq()/disable_irq() calls in qcom_pas_attach()
with matching handover_irq_enabled assignments, keeping the flag consistent
with actual hardware state.

Fixes: 16472c99f469 ("remoteproc: qcom: pas: Add late attach support for subsystems")
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index ca8e61254c44..25942200ba03 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -524,6 +524,7 @@ static int qcom_pas_attach(struct rproc *rproc)
 	int ret;
 
 	pas->q6v5.handover_issued = true;
+	pas->q6v5.handover_irq_enabled = true;
 	enable_irq(pas->q6v5.handover_irq);
 
 	pas->q6v5.running = true;
@@ -570,6 +571,7 @@ static int qcom_pas_attach(struct rproc *rproc)
 	pas->rproc->state = RPROC_OFFLINE;
 	ret = -EINVAL;
 disable_running:
+	pas->q6v5.handover_irq_enabled = false;
 	disable_irq(pas->q6v5.handover_irq);
 	pas->q6v5.running = false;
 
-- 
2.55.0


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

end of thread, other threads:[~2026-09-01 16:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 18:13 [PATCH 1/3] remoteproc: qcom_q6v5_pas: Fix unbalanced enable for handover IRQ after attach Mukesh Ojha
2026-08-28 18:13 ` [PATCH 2/3] remoteproc: qcom_q6v5: Skip handover callback if already issued Mukesh Ojha
2026-08-31  5:52   ` Stephan Gerhold
2026-08-31 15:57     ` Bjorn Andersson
2026-08-31 17:24     ` Mukesh Ojha
2026-08-28 18:13 ` [PATCH 3/3] remoteproc: qcom_q6v5_pas: Add per-PD proxy performance states for Hawi CDSP Mukesh Ojha
2026-08-31  7:08   ` Konrad Dybcio
2026-08-31 17:28     ` Mukesh Ojha
2026-08-31 15:56   ` Bjorn Andersson
2026-08-31 19:16     ` Mukesh Ojha
2026-09-01 16:28       ` Bjorn Andersson

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®