* [PATCH v2] soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
@ 2026-05-06 15:41 Md Shofiqul Islam
2026-05-14 18:58 ` Md Shofiqul Islam
0 siblings, 1 reply; 2+ messages in thread
From: Md Shofiqul Islam @ 2026-05-06 15:41 UTC (permalink / raw)
To: nm, ssantosh, linux-arm-kernel, linux-kernel; +Cc: Md Shofiqul Islam
Implement the TODO in knav_queue_remove() by stopping PDSPs and
freeing queue regions and queue ranges before disabling runtime PM,
mirroring the cleanup performed in the probe error path.
Set device_ready to false before cleanup to prevent any further
use of the device during teardown.
This ensures resources are released on driver unbind and avoids
leaking queue/region state.
Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
drivers/soc/ti/knav_qmss_queue.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 86d7a9c9ae..a064457878 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -1873,7 +1873,12 @@ static int knav_queue_probe(struct platform_device *pdev)
static void knav_queue_remove(struct platform_device *pdev)
{
- /* TODO: Free resources */
+ struct knav_device *kdev = platform_get_drvdata(pdev);
+
+ device_ready = false;
+ knav_queue_stop_pdsps(kdev);
+ knav_queue_free_regions(kdev);
+ knav_free_queue_ranges(kdev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
}
--
2.54.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
2026-05-06 15:41 [PATCH v2] soc: ti: knav_qmss_queue: Implement resource cleanup in remove() Md Shofiqul Islam
@ 2026-05-14 18:58 ` Md Shofiqul Islam
0 siblings, 0 replies; 2+ messages in thread
From: Md Shofiqul Islam @ 2026-05-14 18:58 UTC (permalink / raw)
To: nm; +Cc: ssantosh, linux-arm-kernel, linux-kernel
Hi Nishanth,
Gentle ping on this patch. You suggested this fix — the patch
implements exactly what was discussed: stopping PDSPs and freeing
queue regions and queue ranges before disabling runtime PM,
mirroring the cleanup already done in the probe error path, and
setting device_ready to false before teardown.
Could you take a look and provide an Acked-by if it looks correct?
The patch has been waiting since November 2025 across several
versions with no reviewer feedback.
Link: https://lore.kernel.org/linux-arm-kernel/20260506154114.2288-1-shofiqtest@gmail.com/
Thanks,
Shofiq
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-14 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 15:41 [PATCH v2] soc: ti: knav_qmss_queue: Implement resource cleanup in remove() Md Shofiqul Islam
2026-05-14 18:58 ` Md Shofiqul Islam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox