Commit 302b3b38 authored by Barry Song's avatar Barry Song Committed by Vinod Koul

dmaengine: sf-pdma: 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: default avatarBarry Song <song.bao.hua@hisilicon.com>
Cc: Green Wan <green.wan@sifive.com>
Link: https://lore.kernel.org/r/20201027215252.25820-4-song.bao.hua@hisilicon.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent e991c06e
...@@ -326,10 +326,9 @@ static irqreturn_t sf_pdma_done_isr(int irq, void *dev_id) ...@@ -326,10 +326,9 @@ static irqreturn_t sf_pdma_done_isr(int irq, void *dev_id)
{ {
struct sf_pdma_chan *chan = dev_id; struct sf_pdma_chan *chan = dev_id;
struct pdma_regs *regs = &chan->regs; struct pdma_regs *regs = &chan->regs;
unsigned long flags;
u64 residue; u64 residue;
spin_lock_irqsave(&chan->vchan.lock, flags); spin_lock(&chan->vchan.lock);
writel((readl(regs->ctrl)) & ~PDMA_DONE_STATUS_MASK, regs->ctrl); writel((readl(regs->ctrl)) & ~PDMA_DONE_STATUS_MASK, regs->ctrl);
residue = readq(regs->residue); residue = readq(regs->residue);
...@@ -346,7 +345,7 @@ static irqreturn_t sf_pdma_done_isr(int irq, void *dev_id) ...@@ -346,7 +345,7 @@ static irqreturn_t sf_pdma_done_isr(int irq, void *dev_id)
sf_pdma_xfer_desc(chan); sf_pdma_xfer_desc(chan);
} }
spin_unlock_irqrestore(&chan->vchan.lock, flags); spin_unlock(&chan->vchan.lock);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -355,11 +354,10 @@ static irqreturn_t sf_pdma_err_isr(int irq, void *dev_id) ...@@ -355,11 +354,10 @@ static irqreturn_t sf_pdma_err_isr(int irq, void *dev_id)
{ {
struct sf_pdma_chan *chan = dev_id; struct sf_pdma_chan *chan = dev_id;
struct pdma_regs *regs = &chan->regs; struct pdma_regs *regs = &chan->regs;
unsigned long flags;
spin_lock_irqsave(&chan->lock, flags); spin_lock(&chan->lock);
writel((readl(regs->ctrl)) & ~PDMA_ERR_STATUS_MASK, regs->ctrl); writel((readl(regs->ctrl)) & ~PDMA_ERR_STATUS_MASK, regs->ctrl);
spin_unlock_irqrestore(&chan->lock, flags); spin_unlock(&chan->lock);
tasklet_schedule(&chan->err_tasklet); tasklet_schedule(&chan->err_tasklet);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment