All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
  2026-05-15 13:48 ` Nishanth Menon
  0 siblings, 2 replies; 4+ 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] 4+ 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
  2026-05-15 11:12   ` Nishanth Menon
  2026-05-15 13:48 ` Nishanth Menon
  1 sibling, 1 reply; 4+ 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] 4+ messages in thread

* Re: [PATCH v2] soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
  2026-05-14 18:58 ` Md Shofiqul Islam
@ 2026-05-15 11:12   ` Nishanth Menon
  0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2026-05-15 11:12 UTC (permalink / raw)
  To: Md Shofiqul Islam; +Cc: ssantosh, linux-arm-kernel, linux-kernel

On 21:58-20260514, Md Shofiqul Islam wrote:
> 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/

Usually the latest version of the patch does need a few days of
soaking in mailing list before being picked up. I was going to do that
later today.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource

^ permalink raw reply	[flat|nested] 4+ 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
@ 2026-05-15 13:48 ` Nishanth Menon
  1 sibling, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2026-05-15 13:48 UTC (permalink / raw)
  To: ssantosh, linux-arm-kernel, linux-kernel, Md Shofiqul Islam
  Cc: Nishanth Menon

Hi Md Shofiqul Islam,

On Wed, 06 May 2026 18:41:14 +0300, Md Shofiqul Islam wrote:
> 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.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].

Thank you!

[1/1] soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
      commit: 10a1969353b20caa50c320717e054601631c0d3e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource



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

end of thread, other threads:[~2026-05-15 13:49 UTC | newest]

Thread overview: 4+ 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
2026-05-15 11:12   ` Nishanth Menon
2026-05-15 13:48 ` Nishanth Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.