[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210507063647.111209-1-chanho61.park@samsung.com>
Date: Fri, 7 May 2021 15:36:47 +0900
From: Chanho Park <chanho61.park@...sung.com>
To: Vinod Koul <vkoul@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Bumyong Lee <bumyong.lee@...sung.com>,
Jongho Park <jongho7.park@...sung.com>,
Chanho Park <chanho61.park@...sung.com>
Subject: [PATCH] dmaengine: pl330: fix wrong usage of spinlock flags in
dma_cyclc
From: Bumyong Lee <bumyong.lee@...sung.com>
flags varible which is the input parameter of pl330_prep_dma_cyclic()
should not be used by spinlock_irq[save/restore] function.
Signed-off-by: Jongho Park <jongho7.park@...sung.com>
Signed-off-by: Bumyong Lee <bumyong.lee@...sung.com>
Signed-off-by: Chanho Park <chanho61.park@...sung.com>
---
drivers/dma/pl330.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index fd8d2bc3be9f..110de8a60058 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2694,13 +2694,15 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
for (i = 0; i < len / period_len; i++) {
desc = pl330_get_desc(pch);
if (!desc) {
+ unsigned long iflags;
+
dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n",
__func__, __LINE__);
if (!first)
return NULL;
- spin_lock_irqsave(&pl330->pool_lock, flags);
+ spin_lock_irqsave(&pl330->pool_lock, iflags);
while (!list_empty(&first->node)) {
desc = list_entry(first->node.next,
@@ -2710,7 +2712,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
list_move_tail(&first->node, &pl330->desc_pool);
- spin_unlock_irqrestore(&pl330->pool_lock, flags);
+ spin_unlock_irqrestore(&pl330->pool_lock, iflags);
return NULL;
}
--
2.31.1
Powered by blists - more mailing lists