提交 8c94b83e 编写于 作者: B Barry Song 提交者: Vinod Koul

dmaengine: moxart-dma: remove redundant irqsave and irqrestore in hardIRQ

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: NBarry Song <song.bao.hua@hisilicon.com>
Link: https://lore.kernel.org/r/20201027215252.25820-9-song.bao.hua@hisilicon.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 d9c8d4b2
...@@ -524,7 +524,6 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid) ...@@ -524,7 +524,6 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid)
struct moxart_dmadev *mc = devid; struct moxart_dmadev *mc = devid;
struct moxart_chan *ch = &mc->slave_chans[0]; struct moxart_chan *ch = &mc->slave_chans[0];
unsigned int i; unsigned int i;
unsigned long flags;
u32 ctrl; u32 ctrl;
dev_dbg(chan2dev(&ch->vc.chan), "%s\n", __func__); dev_dbg(chan2dev(&ch->vc.chan), "%s\n", __func__);
...@@ -541,14 +540,14 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid) ...@@ -541,14 +540,14 @@ static irqreturn_t moxart_dma_interrupt(int irq, void *devid)
if (ctrl & APB_DMA_FIN_INT_STS) { if (ctrl & APB_DMA_FIN_INT_STS) {
ctrl &= ~APB_DMA_FIN_INT_STS; ctrl &= ~APB_DMA_FIN_INT_STS;
if (ch->desc) { if (ch->desc) {
spin_lock_irqsave(&ch->vc.lock, flags); spin_lock(&ch->vc.lock);
if (++ch->sgidx < ch->desc->sglen) { if (++ch->sgidx < ch->desc->sglen) {
moxart_dma_start_sg(ch, ch->sgidx); moxart_dma_start_sg(ch, ch->sgidx);
} else { } else {
vchan_cookie_complete(&ch->desc->vd); vchan_cookie_complete(&ch->desc->vd);
moxart_dma_start_desc(&ch->vc.chan); moxart_dma_start_desc(&ch->vc.chan);
} }
spin_unlock_irqrestore(&ch->vc.lock, flags); spin_unlock(&ch->vc.lock);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册