dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <song.bao.hua@hisilicon.com>
To: <vkoul@kernel.org>, <dmaengine@vger.kernel.org>
Cc: Barry Song <song.bao.hua@hisilicon.com>
Subject: [PATCH 01/10] dmaengine: ipu_idmac: remove redundant irqsave and restore in hardIRQ
Date: Fri, 16 Oct 2020 12:59:12 +1300	[thread overview]
Message-ID: <20201015235921.21224-2-song.bao.hua@hisilicon.com> (raw)
In-Reply-To: <20201015235921.21224-1-song.bao.hua@hisilicon.com>

Running in hardIRQ, disabling IRQ is redundant.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 drivers/dma/ipu/ipu_idmac.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index 38036db284cb..104ad420abbe 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -1160,14 +1160,13 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 	struct idmac_tx_desc *desc, *descnew;
 	bool done = false;
 	u32 ready0, ready1, curbuf, err;
-	unsigned long flags;
 	struct dmaengine_desc_callback cb;
 
 	/* IDMAC has cleared the respective BUFx_RDY bit, we manage the buffer */
 
 	dev_dbg(dev, "IDMAC irq %d, buf %d\n", irq, ichan->active_buffer);
 
-	spin_lock_irqsave(&ipu_data.lock, flags);
+	spin_lock(&ipu_data.lock);
 
 	ready0	= idmac_read_ipureg(&ipu_data, IPU_CHA_BUF0_RDY);
 	ready1	= idmac_read_ipureg(&ipu_data, IPU_CHA_BUF1_RDY);
@@ -1176,7 +1175,7 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 
 	if (err & (1 << chan_id)) {
 		idmac_write_ipureg(&ipu_data, 1 << chan_id, IPU_INT_STAT_4);
-		spin_unlock_irqrestore(&ipu_data.lock, flags);
+		spin_unlock(&ipu_data.lock);
 		/*
 		 * Doing this
 		 * ichan->sg[0] = ichan->sg[1] = NULL;
@@ -1188,7 +1187,7 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 			 chan_id, ready0, ready1, curbuf);
 		return IRQ_HANDLED;
 	}
-	spin_unlock_irqrestore(&ipu_data.lock, flags);
+	spin_unlock(&ipu_data.lock);
 
 	/* Other interrupts do not interfere with this channel */
 	spin_lock(&ichan->lock);
@@ -1251,9 +1250,9 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
 		if (unlikely(sgnew)) {
 			ipu_submit_buffer(ichan, descnew, sgnew, !ichan->active_buffer);
 		} else {
-			spin_lock_irqsave(&ipu_data.lock, flags);
+			spin_lock(&ipu_data.lock);
 			ipu_ic_disable_task(&ipu_data, chan_id);
-			spin_unlock_irqrestore(&ipu_data.lock, flags);
+			spin_unlock(&ipu_data.lock);
 			ichan->status = IPU_CHANNEL_READY;
 			/* Continue to check for complete descriptor */
 		}
-- 
2.25.1


  reply	other threads:[~2020-10-16  0:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 23:59 [PATCH 00/10] dmaengine: a bundle of cleanup on spin_lock_irqsave/irqrestore Barry Song
2020-10-15 23:59 ` Barry Song [this message]
2020-10-15 23:59 ` [PATCH 02/10] dmaengine: k3-udma: remove redundant irqsave and irqrestore in hardIRQ Barry Song
2020-10-19 13:45   ` Peter Ujfalusi
2020-10-15 23:59 ` [PATCH 03/10] dmaengine: sf-pdma: " Barry Song
2020-10-15 23:59 ` [PATCH 04/10] dmaengine: tegra210-adma: " Barry Song
2020-10-19 10:31   ` Jon Hunter
2020-10-15 23:59 ` [PATCH 05/10] dmaengine: milbeaut-xdmac: " Barry Song
2020-10-15 23:59 ` [PATCH 06/10] dmaengine: k3dma: " Barry Song
2020-10-15 23:59 ` [PATCH 07/10] dmaengine: hisi_dma: " Barry Song
2020-10-26  1:23   ` Zhou Wang
2020-10-15 23:59 ` [PATCH 08/10] dmaengine: moxart-dma: " Barry Song
2020-10-15 23:59 ` [PATCH 09/10] dmaengine: ste_dma40: " Barry Song
2020-10-29 14:01   ` Linus Walleij
2020-10-29 20:58     ` Song Bao Hua (Barry Song)
2020-10-15 23:59 ` [PATCH 10/10] dmaengine: pxa_dma: " Barry Song
2020-10-23 20:16   ` Robert Jarzmik

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=20201015235921.21224-2-song.bao.hua@hisilicon.com \
    --to=song.bao.hua@hisilicon.com \
    --cc=dmaengine@vger.kernel.org \
    --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 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).