* [PATCH v2 06/64] dmaengine: fsldma: migrate tasklet to dma_chan BH [not found] ` <cover.1785183549.git.allen.lkml@gmail.com> @ 2026-07-27 20:28 ` Allen Pais [not found] ` <cover.1786384168.git.allen.lkml@gmail.com> 1 sibling, 0 replies; 3+ messages in thread From: Allen Pais @ 2026-07-27 20:28 UTC (permalink / raw) To: Vinod Koul, Frank Li Cc: Allen Pais, dmaengine, linux-kernel, Arnd Bergmann, Kees Cook, Zhang Wei, linuxppc-dev Replace the per-channel tasklet with the shared dma_chan BH helper. The handler continues to run in softirq context while dmaengine owns the common scheduling and teardown mechanism. Signed-off-by: Allen Pais <allen.lkml@gmail.com> --- drivers/dma/fsldma.c | 10 +++++----- drivers/dma/fsldma.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 22d62d958abd..1cb6ce327078 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -968,18 +968,18 @@ static irqreturn_t fsldma_chan_irq(int irq, void *data) chan_err(chan, "irq: unhandled sr 0x%08x\n", stat); /* - * Schedule the tasklet to handle all cleanup of the current + * Queue the BH worker to handle all cleanup of the current * transaction. It will start a new transaction if there is * one pending. */ - tasklet_schedule(&chan->tasklet); + dma_chan_schedule_bh(&chan->common); chan_dbg(chan, "irq: Exit\n"); return IRQ_HANDLED; } -static void dma_do_tasklet(struct tasklet_struct *t) +static void dma_do_tasklet(struct dma_chan *c) { - struct fsldma_chan *chan = from_tasklet(chan, t, tasklet); + struct fsldma_chan *chan = to_fsl_chan(c); chan_dbg(chan, "tasklet entry\n"); @@ -1152,7 +1152,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev, } fdev->chan[chan->id] = chan; - tasklet_setup(&chan->tasklet, dma_do_tasklet); + dma_chan_init_bh(&chan->common, dma_do_tasklet); snprintf(chan->name, sizeof(chan->name), "chan%d", chan->id); /* Initialize the channel */ diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h index d7b7a3138b85..cab33d010d51 100644 --- a/drivers/dma/fsldma.h +++ b/drivers/dma/fsldma.h @@ -173,7 +173,6 @@ struct fsldma_chan { struct device *dev; /* Channel device */ int irq; /* Channel IRQ */ int id; /* Raw id of this channel */ - struct tasklet_struct tasklet; u32 feature; bool idle; /* DMA controller is idle */ #ifdef CONFIG_PM -- 2.43.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <cover.1786384168.git.allen.lkml@gmail.com>]
* [PATCH v3 06/34] dmaengine: fsldma: migrate tasklet to dmaengine BH [not found] ` <cover.1786384168.git.allen.lkml@gmail.com> @ 2026-08-10 18:09 ` Allen Pais 2026-09-02 14:52 ` Frank Li 0 siblings, 1 reply; 3+ messages in thread From: Allen Pais @ 2026-08-10 18:09 UTC (permalink / raw) To: Vinod Koul, Frank Li Cc: Allen Pais, dmaengine, linux-kernel, Arnd Bergmann, Kees Cook, Zhang Wei, linuxppc-dev Replace the per-channel tasklet with the shared dmaengine BH helper. The handler continues to run in softirq context while dmaengine owns the common scheduling and teardown mechanism. Signed-off-by: Allen Pais <allen.lkml@gmail.com> --- drivers/dma/fsldma.c | 10 +++++----- drivers/dma/fsldma.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 22d62d958abd..f52547611db9 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -968,18 +968,18 @@ static irqreturn_t fsldma_chan_irq(int irq, void *data) chan_err(chan, "irq: unhandled sr 0x%08x\n", stat); /* - * Schedule the tasklet to handle all cleanup of the current + * Queue the BH worker to handle all cleanup of the current * transaction. It will start a new transaction if there is * one pending. */ - tasklet_schedule(&chan->tasklet); + dmaengine_schedule_bh(&chan->common); chan_dbg(chan, "irq: Exit\n"); return IRQ_HANDLED; } -static void dma_do_tasklet(struct tasklet_struct *t) +static void dma_do_tasklet(struct dma_chan *c) { - struct fsldma_chan *chan = from_tasklet(chan, t, tasklet); + struct fsldma_chan *chan = to_fsl_chan(c); chan_dbg(chan, "tasklet entry\n"); @@ -1152,7 +1152,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev, } fdev->chan[chan->id] = chan; - tasklet_setup(&chan->tasklet, dma_do_tasklet); + dmaengine_init_bh(&chan->common, dma_do_tasklet); snprintf(chan->name, sizeof(chan->name), "chan%d", chan->id); /* Initialize the channel */ diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h index d7b7a3138b85..cab33d010d51 100644 --- a/drivers/dma/fsldma.h +++ b/drivers/dma/fsldma.h @@ -173,7 +173,6 @@ struct fsldma_chan { struct device *dev; /* Channel device */ int irq; /* Channel IRQ */ int id; /* Raw id of this channel */ - struct tasklet_struct tasklet; u32 feature; bool idle; /* DMA controller is idle */ #ifdef CONFIG_PM -- 2.43.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 06/34] dmaengine: fsldma: migrate tasklet to dmaengine BH 2026-08-10 18:09 ` [PATCH v3 06/34] dmaengine: fsldma: migrate tasklet to dmaengine BH Allen Pais @ 2026-09-02 14:52 ` Frank Li 0 siblings, 0 replies; 3+ messages in thread From: Frank Li @ 2026-09-02 14:52 UTC (permalink / raw) To: Allen Pais Cc: Vinod Koul, Frank Li, dmaengine, linux-kernel, Arnd Bergmann, Kees Cook, Zhang Wei, linuxppc-dev On Mon, Aug 10, 2026 at 11:09:07AM -0700, Allen Pais wrote: > Replace the per-channel tasklet with the shared dmaengine BH helper. > The handler continues to run in softirq context while dmaengine owns > the common scheduling and teardown mechanism. > > Signed-off-by: Allen Pais <allen.lkml@gmail.com> > --- Reviewed-by: Frank Li <Frank.Li@nxp.com> > drivers/dma/fsldma.c | 10 +++++----- > drivers/dma/fsldma.h | 1 - > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c > index 22d62d958abd..f52547611db9 100644 > --- a/drivers/dma/fsldma.c > +++ b/drivers/dma/fsldma.c > @@ -968,18 +968,18 @@ static irqreturn_t fsldma_chan_irq(int irq, void *data) > chan_err(chan, "irq: unhandled sr 0x%08x\n", stat); > > /* > - * Schedule the tasklet to handle all cleanup of the current > + * Queue the BH worker to handle all cleanup of the current > * transaction. It will start a new transaction if there is > * one pending. > */ > - tasklet_schedule(&chan->tasklet); > + dmaengine_schedule_bh(&chan->common); > chan_dbg(chan, "irq: Exit\n"); > return IRQ_HANDLED; > } > > -static void dma_do_tasklet(struct tasklet_struct *t) > +static void dma_do_tasklet(struct dma_chan *c) > { > - struct fsldma_chan *chan = from_tasklet(chan, t, tasklet); > + struct fsldma_chan *chan = to_fsl_chan(c); > > chan_dbg(chan, "tasklet entry\n"); > > @@ -1152,7 +1152,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev, > } > > fdev->chan[chan->id] = chan; > - tasklet_setup(&chan->tasklet, dma_do_tasklet); > + dmaengine_init_bh(&chan->common, dma_do_tasklet); > snprintf(chan->name, sizeof(chan->name), "chan%d", chan->id); > > /* Initialize the channel */ > diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h > index d7b7a3138b85..cab33d010d51 100644 > --- a/drivers/dma/fsldma.h > +++ b/drivers/dma/fsldma.h > @@ -173,7 +173,6 @@ struct fsldma_chan { > struct device *dev; /* Channel device */ > int irq; /* Channel IRQ */ > int id; /* Raw id of this channel */ > - struct tasklet_struct tasklet; > u32 feature; > bool idle; /* DMA controller is idle */ > #ifdef CONFIG_PM > -- > 2.43.0 > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-02 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260108080332.2341725-1-allen.lkml@gmail.com>
[not found] ` <cover.1785183549.git.allen.lkml@gmail.com>
2026-07-27 20:28 ` [PATCH v2 06/64] dmaengine: fsldma: migrate tasklet to dma_chan BH Allen Pais
[not found] ` <cover.1786384168.git.allen.lkml@gmail.com>
2026-08-10 18:09 ` [PATCH v3 06/34] dmaengine: fsldma: migrate tasklet to dmaengine BH Allen Pais
2026-09-02 14:52 ` Frank Li
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox