提交 1ff20656 编写于 作者: B Barry Song 提交者: Vinod Koul

dmaengine: k3dma: 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-7-song.bao.hua@hisilicon.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 280e7f90
...@@ -223,24 +223,23 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id) ...@@ -223,24 +223,23 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id)
i = __ffs(stat); i = __ffs(stat);
stat &= ~BIT(i); stat &= ~BIT(i);
if (likely(tc1 & BIT(i)) || (tc2 & BIT(i))) { if (likely(tc1 & BIT(i)) || (tc2 & BIT(i))) {
unsigned long flags;
p = &d->phy[i]; p = &d->phy[i];
c = p->vchan; c = p->vchan;
if (c && (tc1 & BIT(i))) { if (c && (tc1 & BIT(i))) {
spin_lock_irqsave(&c->vc.lock, flags); spin_lock(&c->vc.lock);
if (p->ds_run != NULL) { if (p->ds_run != NULL) {
vchan_cookie_complete(&p->ds_run->vd); vchan_cookie_complete(&p->ds_run->vd);
p->ds_done = p->ds_run; p->ds_done = p->ds_run;
p->ds_run = NULL; p->ds_run = NULL;
} }
spin_unlock_irqrestore(&c->vc.lock, flags); spin_unlock(&c->vc.lock);
} }
if (c && (tc2 & BIT(i))) { if (c && (tc2 & BIT(i))) {
spin_lock_irqsave(&c->vc.lock, flags); spin_lock(&c->vc.lock);
if (p->ds_run != NULL) if (p->ds_run != NULL)
vchan_cyclic_callback(&p->ds_run->vd); vchan_cyclic_callback(&p->ds_run->vd);
spin_unlock_irqrestore(&c->vc.lock, flags); spin_unlock(&c->vc.lock);
} }
irq_chan |= BIT(i); irq_chan |= BIT(i);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册