Re: [PATCH RFC 08/13] dmaengine: sdxi: Context creation/removal, descriptor submission

Markus Elfring
2025-09-15T19:42:34Z

…
> +++ b/drivers/dma/sdxi/context.c
> @@ -0,0 +1,547 @@
…
> +static void sdxi_cxt_free(struct sdxi_cxt *cxt)
> +{
> + struct sdxi_dev *sdxi = cxt->sdxi;
> +
> + mutex_lock(&sdxi->cxt_lock);
> +
> + cleanup_cxt_tables(sdxi, cxt);
> + dma_pool_free(sdxi->cxt_ctl_pool, cxt->cxt_ctl, cxt->cxt_ctl_dma);
> + free_cxt(cxt);
> +
> + mutex_unlock(&sdxi->cxt_lock);
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&sdxi->cxt_lock);”?
https://elixir.bootlin.com/linux/v6.17-rc6/source/include/linux/mutex.h#L228

Regards,
Markus