linux/drivers/dma/xilinx
Lars-Peter Clausen 50db2050fa dmaengine: xilinx: Introduce synchronize() callback
The Xilinx dmaengine driver uses a tasklet to process completed
descriptors and execute their callbacks.

Currently consumers of the DMA channel have to no method of synchronization
against this tasklet when using the Xilinx dmaengine drivers. This can lead
to race conditions when the consumer frees resources that are accessed in
the callback before the tasklet has finished running.

It is not enough to just call dmaengine_terminal_all() since on a
multi-processor system the tasklet can run concurrently to it and might
call the callback after dmaengine_terminate_all() has already finished.

To mitigate this issue implement the synchronize() callback for the driver,
which will wait until the tasklet has finished.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210313125311.4823-1-lars@metafoo.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-03-16 16:15:32 +05:30
..
Makefile dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver 2020-07-17 11:37:59 +05:30
xilinx_dma.c dmaengine: xilinx: Introduce synchronize() callback 2021-03-16 16:15:32 +05:30
xilinx_dpdma.c dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API 2020-10-07 15:22:09 +05:30
zynqmp_dma.c dmaengine: zynqmp_dma: fix kernel-doc style for tasklet 2020-10-08 15:18:46 +05:30