dmaengine: pxa_dma: remove redundant irqsave and irqrestore in hardIRQ
authorBarry Song <song.bao.hua@hisilicon.com>
Tue, 27 Oct 2020 21:52:52 +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: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Link: https://lore.kernel.org/r/20201027215252.25820-11-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/pxa_dma.c

index 349fb31..4a2a796 100644 (file)
@@ -606,7 +606,6 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)
        struct pxad_chan *chan = phy->vchan;
        struct virt_dma_desc *vd, *tmp;
        unsigned int dcsr;
-       unsigned long flags;
        bool vd_completed;
        dma_cookie_t last_started = 0;
 
@@ -616,7 +615,7 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)
        if (dcsr & PXA_DCSR_RUN)
                return IRQ_NONE;
 
-       spin_lock_irqsave(&chan->vc.lock, flags);
+       spin_lock(&chan->vc.lock);
        list_for_each_entry_safe(vd, tmp, &chan->vc.desc_issued, node) {
                vd_completed = is_desc_completed(vd);
                dev_dbg(&chan->vc.chan.dev->device,
@@ -658,7 +657,7 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)
                        pxad_launch_chan(chan, to_pxad_sw_desc(vd));
                }
        }
-       spin_unlock_irqrestore(&chan->vc.lock, flags);
+       spin_unlock(&chan->vc.lock);
        wake_up(&chan->wq_state);
 
        return IRQ_HANDLED;