* [PATCH 1/2] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API
@ 2020-10-06 5:04 Allen Pais
2020-10-06 5:04 ` [PATCH 2/2] dmaengine: xilinx: dpdma: " Allen Pais
2020-10-07 7:09 ` [PATCH 1/2] dmaengine: sf-pdma: " Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Allen Pais @ 2020-10-06 5:04 UTC (permalink / raw)
To: vkoul; +Cc: green.wan, hyun.kwon, dmaengine, Allen Pais, Romain Perier
From: Allen Pais <apais@linux.microsoft.com>
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
drivers/dma/sf-pdma/sf-pdma.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 1e66c6990..528deb5d9 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -281,9 +281,9 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc)
desc->in_use = false;
}
-static void sf_pdma_donebh_tasklet(unsigned long arg)
+static void sf_pdma_donebh_tasklet(struct tasklet_struct *t)
{
- struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
+ struct sf_pdma_chan *chan = from_tasklet(chan, t, done_tasklet);
unsigned long flags;
spin_lock_irqsave(&chan->lock, flags);
@@ -300,9 +300,9 @@ static void sf_pdma_donebh_tasklet(unsigned long arg)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
}
-static void sf_pdma_errbh_tasklet(unsigned long arg)
+static void sf_pdma_errbh_tasklet(struct tasklet_struct *t)
{
- struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
+ struct sf_pdma_chan *chan = from_tasklet(chan, t, err_tasklet);
struct sf_pdma_desc *desc = chan->desc;
unsigned long flags;
@@ -475,10 +475,8 @@ static void sf_pdma_setup_chans(struct sf_pdma *pdma)
writel(PDMA_CLEAR_CTRL, chan->regs.ctrl);
- tasklet_init(&chan->done_tasklet,
- sf_pdma_donebh_tasklet, (unsigned long)chan);
- tasklet_init(&chan->err_tasklet,
- sf_pdma_errbh_tasklet, (unsigned long)chan);
+ tasklet_setup(&chan->done_tasklet, sf_pdma_donebh_tasklet);
+ tasklet_setup(&chan->err_tasklet, sf_pdma_errbh_tasklet);
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API
2020-10-06 5:04 [PATCH 1/2] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API Allen Pais
@ 2020-10-06 5:04 ` Allen Pais
2020-10-07 7:09 ` [PATCH 1/2] dmaengine: sf-pdma: " Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Allen Pais @ 2020-10-06 5:04 UTC (permalink / raw)
To: vkoul; +Cc: green.wan, hyun.kwon, dmaengine, Allen Pais, Romain Perier
From: Allen Pais <apais@linux.microsoft.com>
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
drivers/dma/xilinx/xilinx_dpdma.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
index 81ed1e482..55df63dea 100644
--- a/drivers/dma/xilinx/xilinx_dpdma.c
+++ b/drivers/dma/xilinx/xilinx_dpdma.c
@@ -1458,15 +1458,15 @@ static void xilinx_dpdma_disable_irq(struct xilinx_dpdma_device *xdev)
/**
* xilinx_dpdma_chan_err_task - Per channel tasklet for error handling
- * @data: tasklet data to be casted to DPDMA channel structure
+ * @t: pointer to the tasklet associated with this handler
*
* Per channel error handling tasklet. This function waits for the outstanding
* transaction to complete and triggers error handling. After error handling,
* re-enable channel error interrupts, and restart the channel if needed.
*/
-static void xilinx_dpdma_chan_err_task(unsigned long data)
+static void xilinx_dpdma_chan_err_task(struct tasklet_struct *t)
{
- struct xilinx_dpdma_chan *chan = (struct xilinx_dpdma_chan *)data;
+ struct xilinx_dpdma_chan *chan = from_tasklet(chan, t, err_task);
struct xilinx_dpdma_device *xdev = chan->xdev;
unsigned long flags;
@@ -1555,8 +1555,7 @@ static int xilinx_dpdma_chan_init(struct xilinx_dpdma_device *xdev,
spin_lock_init(&chan->lock);
init_waitqueue_head(&chan->wait_to_stop);
- tasklet_init(&chan->err_task, xilinx_dpdma_chan_err_task,
- (unsigned long)chan);
+ tasklet_setup(&chan->err_task, xilinx_dpdma_chan_err_task);
chan->vchan.desc_free = xilinx_dpdma_chan_free_tx_desc;
vchan_init(&chan->vchan, &xdev->common);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API
2020-10-06 5:04 [PATCH 1/2] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API Allen Pais
2020-10-06 5:04 ` [PATCH 2/2] dmaengine: xilinx: dpdma: " Allen Pais
@ 2020-10-07 7:09 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-10-07 7:09 UTC (permalink / raw)
To: Allen Pais; +Cc: green.wan, hyun.kwon, dmaengine, Allen Pais, Romain Perier
On 06-10-20, 10:34, Allen Pais wrote:
> From: Allen Pais <apais@linux.microsoft.com>
>
> In preparation for unconditionally passing the
> struct tasklet_struct pointer to all tasklet
> callbacks, switch to using the new tasklet_setup()
> and from_tasklet() to pass the tasklet pointer explicitly.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-07 7:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 5:04 [PATCH 1/2] dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API Allen Pais
2020-10-06 5:04 ` [PATCH 2/2] dmaengine: xilinx: dpdma: " Allen Pais
2020-10-07 7:09 ` [PATCH 1/2] dmaengine: sf-pdma: " Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).