From: Barry Song <song.bao.hua@hisilicon.com> To: <vkoul@kernel.org>, <dmaengine@vger.kernel.org> Cc: <linuxarm@huawei.com>, Barry Song <song.bao.hua@hisilicon.com>, "Linus Walleij" <linus.walleij@linaro.org> Subject: [PATCH v2 09/10] dmaengine: ste_dma40: remove redundant irqsave and irqrestore in hardIRQ Date: Wed, 28 Oct 2020 10:52:51 +1300 Message-ID: <20201027215252.25820-10-song.bao.hua@hisilicon.com> (raw) In-Reply-To: <20201027215252.25820-1-song.bao.hua@hisilicon.com> Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled IRQ. This patch removes the irqsave and irqstore to save some instruction cycles. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> --- drivers/dma/ste_dma40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 77ab1f4730be..4256e55bbf25 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -1643,13 +1643,12 @@ static irqreturn_t d40_handle_interrupt(int irq, void *data) u32 row; long chan = -1; struct d40_chan *d40c; - unsigned long flags; struct d40_base *base = data; u32 *regs = base->regs_interrupt; struct d40_interrupt_lookup *il = base->gen_dmac.il; u32 il_size = base->gen_dmac.il_size; - spin_lock_irqsave(&base->interrupt_lock, flags); + spin_lock(&base->interrupt_lock); /* Read interrupt status of both logical and physical channels */ for (i = 0; i < il_size; i++) @@ -1694,7 +1693,7 @@ static irqreturn_t d40_handle_interrupt(int irq, void *data) spin_unlock(&d40c->lock); } - spin_unlock_irqrestore(&base->interrupt_lock, flags); + spin_unlock(&base->interrupt_lock); return IRQ_HANDLED; } -- 2.25.1
next prev parent reply index Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-27 21:52 [PATCH v2 00/10] dmaengine: a bundle of cleanup on spin_lock_irqsave/irqrestore Barry Song 2020-10-27 21:52 ` [PATCH v2 01/10] dmaengine: ipu_idmac: remove redundant irqsave and restore in hardIRQ Barry Song 2020-10-27 21:52 ` [PATCH v2 02/10] dmaengine: ti: k3-udma: remove redundant irqsave and irqrestore " Barry Song 2020-10-27 21:52 ` [PATCH v2 03/10] dmaengine: sf-pdma: " Barry Song 2020-10-27 21:52 ` [PATCH v2 04/10] dmaengine: tegra210-adma: " Barry Song 2020-10-27 21:52 ` [PATCH v2 05/10] dmaengine: milbeaut-xdmac: " Barry Song 2020-10-27 21:52 ` [PATCH v2 06/10] dmaengine: k3dma: " Barry Song 2020-10-27 21:52 ` [PATCH v2 07/10] dmaengine: hisi_dma: " Barry Song 2020-10-27 21:52 ` [PATCH v2 08/10] dmaengine: moxart-dma: " Barry Song 2020-10-27 21:52 ` Barry Song [this message] 2020-11-05 13:48 ` [PATCH v2 09/10] dmaengine: ste_dma40: " Linus Walleij 2020-10-27 21:52 ` [PATCH v2 10/10] dmaengine: pxa_dma: " Barry Song 2020-11-09 11:56 ` [PATCH v2 00/10] dmaengine: a bundle of cleanup on spin_lock_irqsave/irqrestore 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=20201027215252.25820-10-song.bao.hua@hisilicon.com \ --to=song.bao.hua@hisilicon.com \ --cc=dmaengine@vger.kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linuxarm@huawei.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
dmaengine Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \ dmaengine@vger.kernel.org public-inbox-index dmaengine Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine AGPL code for this site: git clone https://public-inbox.org/public-inbox.git