summaryrefslogtreecommitdiffstats
path: root/drivers/dma/edma.c
diff options
context:
space:
mode:
authorJoel Fernandes <joelf@ti.com>2014-04-17 00:58:33 -0500
committerVinod Koul <vinod.koul@intel.com>2014-04-23 11:21:17 +0530
commit406efb1a745c1dc512dc9c3c859e302e7b7f907e (patch)
treee209379f0e4ae06f2332085c2d59a97201e7bfcd /drivers/dma/edma.c
parent8cc3e30bea9a90f9ab7a1bc4612792c40ad7ae95 (diff)
downloadtalos-op-linux-406efb1a745c1dc512dc9c3c859e302e7b7f907e.tar.gz
talos-op-linux-406efb1a745c1dc512dc9c3c859e302e7b7f907e.zip
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: Joel Fernandes <joelf@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/edma.c')
-rw-r--r--drivers/dma/edma.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 43f56a7d9d61..fa87fd52b0ad 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -682,7 +682,6 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
struct edma_chan *echan = data;
struct device *dev = echan->vchan.chan.device->dev;
struct edma_desc *edesc;
- unsigned long flags;
struct edmacc_param p;
edesc = echan->edesc;
@@ -693,7 +692,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
switch (ch_status) {
case EDMA_DMA_COMPLETE:
- spin_lock_irqsave(&echan->vchan.lock, flags);
+ spin_lock(&echan->vchan.lock);
if (edesc) {
if (edesc->cyclic) {
@@ -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;
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);
@@ -744,7 +743,7 @@ static void edma_callback(unsigned ch_num, u16 ch_status, void *data)
edma_trigger_channel(echan->ch_num);
}
- spin_unlock_irqrestore(&echan->vchan.lock, flags);
+ spin_unlock(&echan->vchan.lock);
break;
default:
OpenPOWER on IntegriCloud