Commit 406efb1a authored by Joel Fernandes's avatar Joel Fernandes Committed by Vinod Koul

dmaengine: edma: No need save/restore interrupt flags during spin_lock in IRQ

The vchan lock in edma_callback is acquired in hard interrupt context. As
interrupts are already disabled, there's no point in save/restoring interrupt
mask bit or cpsr flags.

Get rid of flags local variable and use spin_lock instead of spin_lock_irqsave.
Signed-off-by: default avatarJoel Fernandes <joelf@ti.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 8cc3e30b
...@@ -682,7 +682,6 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data) ...@@ -682,7 +682,6 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
struct edma_chan *echan = data; struct edma_chan *echan = data;
struct device *dev = echan->vchan.chan.device->dev; struct device *dev = echan->vchan.chan.device->dev;
struct edma_desc *edesc; struct edma_desc *edesc;
unsigned long flags;
struct edmacc_param p; struct edmacc_param p;
edesc = echan->edesc; edesc = echan->edesc;
...@@ -693,7 +692,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data) ...@@ -693,7 +692,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
switch (ch_status) { switch (ch_status) {
case EDMA_DMA_COMPLETE: case EDMA_DMA_COMPLETE:
spin_lock_irqsave(&echan->vchan.lock, flags); spin_lock(&echan->vchan.lock);
if (edesc) { if (edesc) {
if (edesc->cyclic) { if (edesc->cyclic) {
...@@ -709,11 +708,11 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data) ...@@ -709,11 +708,11 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
} }
} }
spin_unlock_irqrestore(&echan->vchan.lock, flags); spin_unlock(&echan->vchan.lock);
break; break;
case EDMA_DMA_CC_ERROR: case EDMA_DMA_CC_ERROR:
spin_lock_irqsave(&echan->vchan.lock, flags); spin_lock(&echan->vchan.lock);
edma_read_slot(EDMA_CHAN_SLOT(echan->slot[0]), &p); edma_read_slot(EDMA_CHAN_SLOT(echan->slot[0]), &p);
...@@ -744,7 +743,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data) ...@@ -744,7 +743,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
edma_trigger_channel(echan->ch_num); edma_trigger_channel(echan->ch_num);
} }
spin_unlock_irqrestore(&echan->vchan.lock, flags); spin_unlock(&echan->vchan.lock);
break; break;
default: default:
......
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