Skip to content

Commit

Permalink
dmaengine: tegra-apb: Don't save/restore IRQ flags in interrupt handler
Browse files Browse the repository at this point in the history
The interrupt is already disabled while interrupt handler is running, and
thus, there is no need to save/restore the IRQ flags within the spinlock.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200319212321.3297-1-digetx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Dmitry Osipenko authored and Vinod Koul committed Mar 23, 2020
1 parent a48d44c commit 6de88ea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/dma/tegra20-apb-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,22 +670,21 @@ static void tegra_dma_tasklet(unsigned long data)
static irqreturn_t tegra_dma_isr(int irq, void *dev_id)
{
struct tegra_dma_channel *tdc = dev_id;
unsigned long flags;
u32 status;

spin_lock_irqsave(&tdc->lock, flags);
spin_lock(&tdc->lock);

trace_tegra_dma_isr(&tdc->dma_chan, irq);
status = tdc_read(tdc, TEGRA_APBDMA_CHAN_STATUS);
if (status & TEGRA_APBDMA_STATUS_ISE_EOC) {
tdc_write(tdc, TEGRA_APBDMA_CHAN_STATUS, status);
tdc->isr_handler(tdc, false);
tasklet_schedule(&tdc->tasklet);
spin_unlock_irqrestore(&tdc->lock, flags);
spin_unlock(&tdc->lock);
return IRQ_HANDLED;
}

spin_unlock_irqrestore(&tdc->lock, flags);
spin_unlock(&tdc->lock);
dev_info(tdc2dev(tdc), "Interrupt already served status 0x%08x\n",
status);

Expand Down

0 comments on commit 6de88ea

Please sign in to comment.