dmaengine: hisi_dma: remove redundant irqsave and irqrestore in hardIRQ
authorBarry Song <song.bao.hua@hisilicon.com>
Tue, 27 Oct 2020 21:52:49 +0000 (10:52 +1300)
committerVinod Koul <vkoul@kernel.org>
Mon, 9 Nov 2020 11:55:54 +0000 (17:25 +0530)
Running in hardIRQ, disabling IRQ is redundant since hardIRQ has disabled
IRQ. This patch removes the irqsave and irqstore to save some instruction
cycles.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Acked-by: Zhou Wang <wangzhou1@hisilicon.com>
Link: https://lore.kernel.org/r/20201027215252.25820-8-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/hisi_dma.c

index e1a958a..a259ee0 100644 (file)
@@ -431,9 +431,8 @@ static irqreturn_t hisi_dma_irq(int irq, void *data)
        struct hisi_dma_dev *hdma_dev = chan->hdma_dev;
        struct hisi_dma_desc *desc;
        struct hisi_dma_cqe *cqe;
-       unsigned long flags;
 
-       spin_lock_irqsave(&chan->vc.lock, flags);
+       spin_lock(&chan->vc.lock);
 
        desc = chan->desc;
        cqe = chan->cq + chan->cq_head;
@@ -452,7 +451,7 @@ static irqreturn_t hisi_dma_irq(int irq, void *data)
                chan->desc = NULL;
        }
 
-       spin_unlock_irqrestore(&chan->vc.lock, flags);
+       spin_unlock(&chan->vc.lock);
 
        return IRQ_HANDLED;
 }