[PATCH v3 29/34] dmaengine: pl330: route callbacks via channel BH
Allen Pais <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.dmaengine |
|---|---|
| Message-ID | <98b9e66a1ac9f866f36ecc60d287e479bae22f60.1786384169.git.allen.lkml@gmail.com> |
Convert the per-channel tasklet to dmaengine_*_bh while keeping the controller tasklet for non-callback events. Signed-off-by: Allen Pais <[email protected]> --- drivers/dma/pl330.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 25ba84b18704..1b6069ba0d5e 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -417,9 +417,6 @@ enum desc_status { }; struct dma_pl330_chan { - /* Schedule desc completion */ - struct tasklet_struct task; - /* DMA-Engine Channel */ struct dma_chan chan; @@ -1574,7 +1571,7 @@ static void dma_pl330_rqcb(struct dma_pl330_desc *desc, enum pl330_op_err err) spin_unlock_irqrestore(&pch->lock, flags); - tasklet_schedule(&pch->task); + dmaengine_schedule_bh(&pch->chan); } static void pl330_dotask(struct tasklet_struct *t) @@ -2060,14 +2057,15 @@ static inline void fill_queue(struct dma_pl330_chan *pch) desc->status = DONE; dev_err(pch->dmac->ddma.dev, "%s:%d Bad Desc(%d)\n", __func__, __LINE__, desc->txd.cookie); - tasklet_schedule(&pch->task); + dmaengine_schedule_bh(&pch->chan); } } } -static void pl330_tasklet(struct tasklet_struct *t) +static void pl330_tasklet(struct dma_chan *chan) { - struct dma_pl330_chan *pch = from_tasklet(pch, t, task); + struct dma_pl330_chan *pch = container_of(chan, struct dma_pl330_chan, + chan); struct dma_pl330_desc *desc, *_dt; unsigned long flags; bool power_down = false; @@ -2173,7 +2171,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan) return -ENOMEM; } - tasklet_setup(&pch->task, pl330_tasklet); + dmaengine_init_bh(&pch->chan, pl330_tasklet); spin_unlock_irqrestore(&pl330->lock, flags); @@ -2354,7 +2352,7 @@ static void pl330_free_chan_resources(struct dma_chan *chan) struct pl330_dmac *pl330 = pch->dmac; unsigned long flags; - tasklet_kill(&pch->task); + dmaengine_kill_bh(&pch->chan); pm_runtime_get_sync(pch->dmac->ddma.dev); spin_lock_irqsave(&pl330->lock, flags); @@ -2490,7 +2488,7 @@ static void pl330_issue_pending(struct dma_chan *chan) list_splice_tail_init(&pch->submitted_list, &pch->work_list); spin_unlock_irqrestore(&pch->lock, flags); - pl330_tasklet(&pch->task); + pl330_tasklet(&pch->chan); } /* -- 2.43.0