All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Allen Pais <allen.lkml@gmail.com>, vkoul@kernel.org
Cc: linus.walleij@linaro.org, vireshk@kernel.org, leoyang.li@nxp.com,
	zw@zh-kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
	sean.wang@mediatek.com, matthias.bgg@gmail.com,
	logang@deltatee.com, agross@kernel.org,
	jorn.andersson@linaro.org, green.wan@sifive.com,
	baohua@kernel.org, mripard@kernel.org, wens@csie.org,
	dmaengine@vger.kernel.org,
	Romain Perier <romain.perier@gmail.com>
Subject: Re: [PATCH v3 09/35] dmaengine: ioat: convert tasklets to use new tasklet_setup() API
Date: Mon, 31 Aug 2020 07:47:10 -0700	[thread overview]
Message-ID: <476c5571-8856-fe7e-628c-7328368a82fc@intel.com> (raw)
In-Reply-To: <20200831103542.305571-10-allen.lkml@gmail.com>



On 8/31/2020 3:35 AM, Allen Pais wrote:
> 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 <allen.lkml@gmail.com>

Acked-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/dma/ioat/dma.c  | 6 +++---
>   drivers/dma/ioat/dma.h  | 2 +-
>   drivers/dma/ioat/init.c | 4 +---
>   3 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
> index a814b200299b..bfcf67febfe6 100644
> --- a/drivers/dma/ioat/dma.c
> +++ b/drivers/dma/ioat/dma.c
> @@ -165,7 +165,7 @@ void ioat_stop(struct ioatdma_chan *ioat_chan)
>   	tasklet_kill(&ioat_chan->cleanup_task);
>   
>   	/* final cleanup now that everything is quiesced and can't re-arm */
> -	ioat_cleanup_event((unsigned long)&ioat_chan->dma_chan);
> +	ioat_cleanup_event(&ioat_chan->cleanup_task);
>   }
>   
>   static void __ioat_issue_pending(struct ioatdma_chan *ioat_chan)
> @@ -690,9 +690,9 @@ static void ioat_cleanup(struct ioatdma_chan *ioat_chan)
>   	spin_unlock_bh(&ioat_chan->cleanup_lock);
>   }
>   
> -void ioat_cleanup_event(unsigned long data)
> +void ioat_cleanup_event(struct tasklet_struct *t)
>   {
> -	struct ioatdma_chan *ioat_chan = to_ioat_chan((void *)data);
> +	struct ioatdma_chan *ioat_chan = from_tasklet(ioat_chan, t, cleanup_task);
>   
>   	ioat_cleanup(ioat_chan);
>   	if (!test_bit(IOAT_RUN, &ioat_chan->state))
> diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
> index f7f31fdf14cf..140cfe3782fb 100644
> --- a/drivers/dma/ioat/dma.h
> +++ b/drivers/dma/ioat/dma.h
> @@ -393,7 +393,7 @@ int ioat_reset_hw(struct ioatdma_chan *ioat_chan);
>   enum dma_status
>   ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie,
>   		struct dma_tx_state *txstate);
> -void ioat_cleanup_event(unsigned long data);
> +void ioat_cleanup_event(struct tasklet_struct *t);
>   void ioat_timer_event(struct timer_list *t);
>   int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs);
>   void ioat_issue_pending(struct dma_chan *chan);
> diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
> index 8a53f5c96b16..191b59279007 100644
> --- a/drivers/dma/ioat/init.c
> +++ b/drivers/dma/ioat/init.c
> @@ -767,8 +767,6 @@ ioat_init_channel(struct ioatdma_device *ioat_dma,
>   		  struct ioatdma_chan *ioat_chan, int idx)
>   {
>   	struct dma_device *dma = &ioat_dma->dma_dev;
> -	struct dma_chan *c = &ioat_chan->dma_chan;
> -	unsigned long data = (unsigned long) c;
>   
>   	ioat_chan->ioat_dma = ioat_dma;
>   	ioat_chan->reg_base = ioat_dma->reg_base + (0x80 * (idx + 1));
> @@ -778,7 +776,7 @@ ioat_init_channel(struct ioatdma_device *ioat_dma,
>   	list_add_tail(&ioat_chan->dma_chan.device_node, &dma->channels);
>   	ioat_dma->idx[idx] = ioat_chan;
>   	timer_setup(&ioat_chan->timer, ioat_timer_event, 0);
> -	tasklet_init(&ioat_chan->cleanup_task, ioat_cleanup_event, data);
> +	tasklet_setup(&ioat_chan->cleanup_task, ioat_cleanup_event);
>   }
>   
>   #define IOAT_NUM_SRC_TEST 6 /* must be <= 8 */
> 

  reply	other threads:[~2020-08-31 14:47 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 10:35 [PATCH v3 00/35] dmaengine: convert tasklets to use new Allen Pais
2020-08-31 10:35 ` [PATCH v3 01/35] dmaengine: altera-msgdma: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-31 10:35 ` [PATCH v3 02/35] dmaengine: at_hdmac: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 03/35] dmaengine: at_xdmac: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 04/35] dmaengine: coh901318: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 05/35] dmaengine: dw: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 06/35] dmaengine: ep93xx: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 07/35] dmaengine: fsl: " Allen Pais
2020-08-31 12:42   ` kernel test robot
2020-08-31 10:35 ` [PATCH v3 08/35] dmaengine: imx-dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 09/35] dmaengine: ioat: " Allen Pais
2020-08-31 14:47   ` Dave Jiang [this message]
2020-08-31 10:35 ` [PATCH v3 10/35] dmaengine: iop_adma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 11/35] dmaengine: ipu: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 12/35] dmaengine: k3dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 13/35] dmaengine: mediatek: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 14/35] dmaengine: mmp: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 15/35] dmaengine: mpc512x: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 16/35] dmaengine: mv_xor: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 17/35] dmaengine: mxs-dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 18/35] dmaengine: nbpfaxi: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 19/35] dmaengine: pch_dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 20/35] dmaengine: pl330: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 21/35] dmaengine: ppc4xx: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 22/35] dmaengine: qcom: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 23/35] dmaengine: sa11x0: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 24/35] dmaengine: sirf-dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 25/35] dmaengine: ste_dma40: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 26/35] dmaengine: sun6i: " Allen Pais
2020-08-31 11:23   ` Chen-Yu Tsai
2020-08-31 10:35 ` [PATCH v3 27/35] dmaengine: tegra20: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 28/35] dmaengine: timb_dma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 29/35] dmaengine: txx9dmac: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 30/35] dmaengine: virt-dma: " Allen Pais
2020-08-31 11:30   ` Peter Ujfalusi
2020-08-31 10:35 ` [PATCH v3 31/35] dmaengine: xgene: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 32/35] dmaengine: xilinx: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 33/35] dmaengine: plx_dma: " Allen Pais
2020-08-31 15:47   ` Logan Gunthorpe
2020-08-31 15:56     ` Allen
2020-08-31 16:17       ` Logan Gunthorpe
2020-08-31 10:35 ` [PATCH v3 34/35] dmaengine: sf-pdma: " Allen Pais
2020-08-31 10:35 ` [PATCH v3 35/35] dmaengine: k3-udma: " Allen Pais
2020-08-31 11:30   ` Peter Ujfalusi
2020-09-18  6:52 ` [PATCH v3 00/35] dmaengine: convert tasklets to use new Vinod Koul
2020-09-21  5:54   ` Allen

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=476c5571-8856-fe7e-628c-7328368a82fc@intel.com \
    --to=dave.jiang@intel.com \
    --cc=agross@kernel.org \
    --cc=allen.lkml@gmail.com \
    --cc=baohua@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=green.wan@sifive.com \
    --cc=jorn.andersson@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linus.walleij@linaro.org \
    --cc=logang@deltatee.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=romain.perier@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sean.wang@mediatek.com \
    --cc=shawnguo@kernel.org \
    --cc=vireshk@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.org \
    --cc=zw@zh-kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.