[PATCH v2 32/64] dmaengine: k3-udma: use channel BH for vchan completions
Allen Pais <[email protected]> Mon, 27 Jul 2026 13:34:54 -0700
| Newsgroups | org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <590639c835c2926e2ff26d803f1282a27b147555.1785183549.git.allen.lkml@gmail.com> |
Use the per-channel BH mechanism for custom vchan completion handling and clean up via dma_chan_kill_bh(). Signed-off-by: Allen Pais <[email protected]> --- drivers/dma/ti/k3-udma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 1cf158eb7bdb..12b8a9caf4d2 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -4042,12 +4042,12 @@ static void udma_desc_pre_callback(struct virt_dma_chan *vc, } /* - * This tasklet handles the completion of a DMA descriptor by + * This BH handles the completion of a DMA descriptor by * calling its callback and freeing it. */ -static void udma_vchan_complete(struct tasklet_struct *t) +static void udma_vchan_complete(struct dma_chan *chan) { - struct virt_dma_chan *vc = from_tasklet(vc, t, task); + struct virt_dma_chan *vc = to_virt_chan(chan); struct virt_dma_desc *vd, *_vd; struct dmaengine_desc_callback cb; LIST_HEAD(head); @@ -4112,7 +4112,7 @@ static void udma_free_chan_resources(struct dma_chan *chan) } vchan_free_chan_resources(&uc->vc); - tasklet_kill(&uc->vc.task); + dma_chan_kill_bh(&uc->vc.chan); bcdma_free_bchan_resources(uc); udma_free_tx_resources(uc); @@ -5627,8 +5627,8 @@ static int udma_probe(struct platform_device *pdev) if (!uc->name) return -ENOMEM; vchan_init(&uc->vc, &ud->ddev); - /* Use custom vchan completion handling */ - tasklet_setup(&uc->vc.task, udma_vchan_complete); + /* Override the default vchan completion handler */ + uc->vc.chan.bh_work_fn = udma_vchan_complete; init_completion(&uc->teardown_completed); INIT_DELAYED_WORK(&uc->tx_drain.work, udma_check_tx_completion); } -- 2.43.0