All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: vkoul@kernel.org, dmaengine@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	appana.durga.rao@xilinx.com, michal.simek@xilinx.com,
	m.tretter@pengutronix.de, kernel@pengutronix.de
Subject: [PATCH 5/7] dmaengine: zynqmp_dma: cleanup after completing all descriptors
Date: Thu, 26 Aug 2021 11:47:40 +0200	[thread overview]
Message-ID: <20210826094742.1302009-6-m.tretter@pengutronix.de> (raw)
In-Reply-To: <20210826094742.1302009-1-m.tretter@pengutronix.de>

The current implementation iterates the entire done list for each
completed dma descriptor even if there are multiple completed
descriptors.

Avoid this by first moving all completed descriptors to the done list
and afterwards iterating the done list and finishing the descriptors.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/dma/xilinx/zynqmp_dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 61bb1d7f6ec0..f98ef5fe4902 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -759,10 +759,11 @@ static void zynqmp_dma_do_tasklet(struct tasklet_struct *t)
 
 	while (count) {
 		zynqmp_dma_complete_descriptor(chan);
-		zynqmp_dma_chan_desc_cleanup(chan);
 		count--;
 	}
 
+	zynqmp_dma_chan_desc_cleanup(chan);
+
 	if (chan->idle)
 		zynqmp_dma_start_transfer(chan);
 
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tretter <m.tretter@pengutronix.de>
To: vkoul@kernel.org, dmaengine@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	appana.durga.rao@xilinx.com, michal.simek@xilinx.com,
	m.tretter@pengutronix.de, kernel@pengutronix.de
Subject: [PATCH 5/7] dmaengine: zynqmp_dma: cleanup after completing all descriptors
Date: Thu, 26 Aug 2021 11:47:40 +0200	[thread overview]
Message-ID: <20210826094742.1302009-6-m.tretter@pengutronix.de> (raw)
In-Reply-To: <20210826094742.1302009-1-m.tretter@pengutronix.de>

The current implementation iterates the entire done list for each
completed dma descriptor even if there are multiple completed
descriptors.

Avoid this by first moving all completed descriptors to the done list
and afterwards iterating the done list and finishing the descriptors.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 drivers/dma/xilinx/zynqmp_dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 61bb1d7f6ec0..f98ef5fe4902 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -759,10 +759,11 @@ static void zynqmp_dma_do_tasklet(struct tasklet_struct *t)
 
 	while (count) {
 		zynqmp_dma_complete_descriptor(chan);
-		zynqmp_dma_chan_desc_cleanup(chan);
 		count--;
 	}
 
+	zynqmp_dma_chan_desc_cleanup(chan);
+
 	if (chan->idle)
 		zynqmp_dma_start_transfer(chan);
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-08-26  9:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  9:47 [PATCH 0/7] dmaengine: zynqmp_dma: fix lockdep warning and cleanup Michael Tretter
2021-08-26  9:47 ` Michael Tretter
2021-08-26  9:47 ` [PATCH 1/7] dmaengine: zynqmp_dma: simplify with dev_err_probe Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-08-26  9:47 ` [PATCH 2/7] dmaengine: zynqmp_dma: drop message on probe success Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-08-26  9:47 ` [PATCH 3/7] dmaengine: zynqmp_dma: enable COMPILE_TEST Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-08-26  9:47 ` [PATCH 4/7] dmaengine: zynqmp_dma: cleanup includes Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-08-26  9:47 ` Michael Tretter [this message]
2021-08-26  9:47   ` [PATCH 5/7] dmaengine: zynqmp_dma: cleanup after completing all descriptors Michael Tretter
2021-08-26  9:47 ` [PATCH 6/7] dmaengine: zynqmp_dma: refine dma descriptor locking Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-08-26  9:47 ` [PATCH 7/7] dmaengine: zynqmp_dma: fix lockdep warning in tasklet Michael Tretter
2021-08-26  9:47   ` Michael Tretter
2021-10-01  8:56 ` [PATCH 0/7] dmaengine: zynqmp_dma: fix lockdep warning and cleanup Michael Tretter
2021-10-01  8:56   ` Michael Tretter
2021-10-01 11:56 ` Vinod Koul
2021-10-01 11:56   ` Vinod Koul

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=20210826094742.1302009-6-m.tretter@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=appana.durga.rao@xilinx.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=michal.simek@xilinx.com \
    --cc=vkoul@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.