From: Frank Li <Frank.li@oss.nxp.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: "Sean Wang" <sean.wang@mediatek.com>,
"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Basavaraj Natikar" <Basavaraj.Natikar@amd.com>,
"Jacky Huang" <ychuang3@nuvoton.com>,
"Shan-Chun Hung" <schung@nuvoton.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
"Zhou Wang" <wangzhou1@hisilicon.com>,
"Longfang Liu" <liulongfang@huawei.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Keguang Zhang" <keguang.zhang@gmail.com>,
"Binbin Zhou" <zhoubinbin@loongson.cn>,
"Taichi Sugaya" <sugaya.taichi@socionext.com>,
"Takao Orito" <orito.takao@socionext.com>,
"Amélie Delaunay" <amelie.delaunay@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
"Jon Hunter" <jonathanh@nvidia.com>,
"Thierry Reding" <thierry.reding@kernel.org>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-mips@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback
Date: Tue, 27 Oct 2026 15:00:28 -0500 [thread overview]
Message-ID: <auEC3HAXyvYHbKDf@SMW015318> (raw)
In-Reply-To: <20261027-submit-mtk-uart-dma-synchronize-v1-v3-1-aad7a6b3c62e@gmail.com>
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@oss.nxp.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> 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@nxp.com>
next prev parent reply other threads:[~2026-10-27 20:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 18:22 [PATCH v3 0/2] dmaengine: share virt-dma synchronization and use it for UART APDMA James Hilliard
2026-10-27 18:22 ` [PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback James Hilliard
2026-10-27 20:00 ` Frank Li [this message]
2026-10-27 18:22 ` [PATCH v3 2/2] dmaengine: mediatek: uart: synchronize completion callbacks James Hilliard
2026-10-27 20:01 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auEC3HAXyvYHbKDf@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Basavaraj.Natikar@amd.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=Frank.Li@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=andy@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dmaengine@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=imx@lists.linux.dev \
--cc=james.hilliard1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=keguang.zhang@gmail.com \
--cc=lars@metafoo.de \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=orito.takao@socionext.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=schung@nuvoton.com \
--cc=sean.wang@mediatek.com \
--cc=sugaya.taichi@socionext.com \
--cc=thierry.reding@kernel.org \
--cc=vigneshr@ti.com \
--cc=vkoul@kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=ychuang3@nuvoton.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®