mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] remoteproc: qcom: q6v5-wcss: remove all subdevices on unbind
@ 2026-09-18  4:13 Guangshuo Li
  2026-09-19  7:34 ` kernel test robot
  2026-09-19 13:13 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Guangshuo Li @ 2026-09-18  4:13 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Sivaprakash Murugesan,
	Gokul Sriram Palanisamy, Govind Singh, linux-arm-msm,
	linux-remoteproc, linux-kernel
  Cc: Guangshuo Li, stable

q6v5_wcss_probe() registers GLINK, PDM and SSR remoteproc subdevices,
and may also register a sysmon subdevice. The probe failure path
removes all of these subdevices, but q6v5_wcss_remove() only removes
the PDM subdevice.

As a result, GLINK, SSR and sysmon resources and registrations can
remain after the WCSS driver is removed.

Call rproc_del() before tearing down the Qualcomm-specific resources,
matching the teardown order used by the other Qualcomm Q6 remoteproc
drivers, and remove the GLINK, sysmon and SSR subdevices together with
the existing PDM cleanup.

This issue was found by manual code inspection.

Fixes: 8a226e2c71bb ("remoteproc: wcss: add support for rpmsg communication")
Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
 drivers/remoteproc/qcom_q6v5_wcss.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index b391724cfd08..4d3a1adbf6c1 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -1042,9 +1042,13 @@ static void q6v5_wcss_remove(struct platform_device *pdev)
 	struct rproc *rproc = platform_get_drvdata(pdev);
 	struct q6v5_wcss *wcss = rproc->priv;
 
+	rproc_del(rproc);
+
 	qcom_q6v5_deinit(&wcss->q6v5);
+	qcom_remove_glink_subdev(rproc, &wcss->glink_subdev);
 	qcom_remove_pdm_subdev(rproc, &wcss->pdm_subdev);
-	rproc_del(rproc);
+	qcom_remove_sysmon_subdev(wcss->sysmon);
++	qcom_remove_ssr_subdev(rproc, &wcss->ssr_subdev);
 }
 
 static const struct wcss_data wcss_ipq8074_res_init = {
-- 
2.43.0


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

end of thread, other threads:[~2026-09-19 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18  4:13 [PATCH] remoteproc: qcom: q6v5-wcss: remove all subdevices on unbind Guangshuo Li
2026-09-19  7:34 ` kernel test robot
2026-09-19 13:13 ` kernel test robot

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®