[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1604473206-32573-2-git-send-email-radhey.shyam.pandey@xilinx.com>
Date: Wed, 4 Nov 2020 12:30:04 +0530
From: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
To: <vkoul@...nel.org>, <dan.j.williams@...el.com>,
<michal.simek@...inx.com>, <nick.graumann@...il.com>,
<andrea.merello@...il.com>, <appana.durga.rao@...inx.com>,
<mcgrof@...nel.org>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<git@...inx.com>, Marc Ferland <ferlandm@...tus.ca>,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: [PATCH 1/3] dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant
From: Marc Ferland <ferlandm@...tus.ca>
The xilinx_dma_poll_timeout macro is sometimes called while holding a
spinlock (see xilinx_dma_issue_pending() for an example) this means we
shouldn't sleep when polling the dma channel registers. To address it
in xilinx poll timeout macro use readl_poll_timeout_atomic instead of
readl_poll_timeout variant.
Signed-off-by: Marc Ferland <ferlandm@...tus.ca>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
---
drivers/dma/xilinx/xilinx_dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 5429497d3560..9c747b08bb0f 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -517,8 +517,8 @@ struct xilinx_dma_device {
#define to_dma_tx_descriptor(tx) \
container_of(tx, struct xilinx_dma_tx_descriptor, async_tx)
#define xilinx_dma_poll_timeout(chan, reg, val, cond, delay_us, timeout_us) \
- readl_poll_timeout(chan->xdev->regs + chan->ctrl_offset + reg, val, \
- cond, delay_us, timeout_us)
+ readl_poll_timeout_atomic(chan->xdev->regs + chan->ctrl_offset + reg, \
+ val, cond, delay_us, timeout_us)
/* IO accessors */
static inline u32 dma_read(struct xilinx_dma_chan *chan, u32 reg)
--
2.7.4
Powered by blists - more mailing lists