Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Barry Song <song.bao.hua@hisilicon.com>
Link: https://lore.kernel.org/r/20201027215252.25820-7-song.bao.hua@hisilicon.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Barry Song and committed by
Vinod Koul
1ff20656 280e7f90

+4 -5
+4 -5
drivers/dma/k3dma.c
··· 223 223 i = __ffs(stat); 224 224 stat &= ~BIT(i); 225 225 if (likely(tc1 & BIT(i)) || (tc2 & BIT(i))) { 226 - unsigned long flags; 227 226 228 227 p = &d->phy[i]; 229 228 c = p->vchan; 230 229 if (c && (tc1 & BIT(i))) { 231 - spin_lock_irqsave(&c->vc.lock, flags); 230 + spin_lock(&c->vc.lock); 232 231 if (p->ds_run != NULL) { 233 232 vchan_cookie_complete(&p->ds_run->vd); 234 233 p->ds_done = p->ds_run; 235 234 p->ds_run = NULL; 236 235 } 237 - spin_unlock_irqrestore(&c->vc.lock, flags); 236 + spin_unlock(&c->vc.lock); 238 237 } 239 238 if (c && (tc2 & BIT(i))) { 240 - spin_lock_irqsave(&c->vc.lock, flags); 239 + spin_lock(&c->vc.lock); 241 240 if (p->ds_run != NULL) 242 241 vchan_cyclic_callback(&p->ds_run->vd); 243 - spin_unlock_irqrestore(&c->vc.lock, flags); 242 + spin_unlock(&c->vc.lock); 244 243 } 245 244 irq_chan |= BIT(i); 246 245 }