Re: [PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback

From: Frank Li

Date: Tue Oct 27 2026 - 16:00:49 EST


On Tue, Oct 27, 2026 at 12:22:26PM -0600, James Hilliard wrote:
> Several virt-dma drivers implement device_synchronize with a wrapper that
> only converts the DMA channel and calls vchan_synchronize(). Provide
> vchan_dma_synchronize() with the DMAengine callback signature so these
> drivers can assign it directly.
>
> Document the requirement to stop the channel and prevent new callbacks
> before synchronization, and the context in which the callback wait may
> run. Replace the equivalent wrappers in the existing drivers with the
> shared helper, preserving their callback-wait and descriptor-cleanup
> behavior.
>
> Suggested-by: Frank Li <Frank.li@xxxxxxxxxxx>
> Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> ---
> drivers/dma/amba-pl08x.c | 11 ++---------
> drivers/dma/amd/ptdma/ptdma-dmaengine.c | 9 +--------
> drivers/dma/arm-dma350.c | 9 +--------
> drivers/dma/bcm2835-dma.c | 9 +--------
> drivers/dma/dma-axi-dmac.c | 9 +--------
> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 9 +--------
> drivers/dma/fsl-edma-main.c | 9 +--------
> drivers/dma/fsl-qdma.c | 9 +--------
> drivers/dma/hisi_dma.c | 9 +--------
> drivers/dma/hsu/hsu.c | 9 +--------
> drivers/dma/idma64.c | 9 +--------
> drivers/dma/img-mdc-dma.c | 9 +--------
> drivers/dma/k3dma.c | 9 +--------
> drivers/dma/loongson/loongson1-apb-dma.c | 7 +------
> drivers/dma/loongson/loongson2-apb-cmc-dma.c | 9 +--------
> drivers/dma/loongson/loongson2-apb-dma.c | 14 +-------------
> drivers/dma/milbeaut-hdmac.c | 7 +------
> drivers/dma/milbeaut-xdmac.c | 7 +------
> drivers/dma/stm32/stm32-dma.c | 9 +--------
> drivers/dma/stm32/stm32-dma3.c | 9 +--------
> drivers/dma/stm32/stm32-mdma.c | 9 +--------
> drivers/dma/tegra210-adma.c | 9 +--------
> drivers/dma/ti/edma.c | 11 ++---------
> drivers/dma/ti/omap-dma.c | 9 +--------
> drivers/dma/uniphier-mdmac.c | 7 +------
> drivers/dma/uniphier-xdmac.c | 7 +------
> drivers/dma/virt-dma.h | 15 +++++++++++++++
> 27 files changed, 43 insertions(+), 205 deletions(-)

Thanks do such cleanup.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>