Commit 0ba2df09 authored by Marc Ferland's avatar Marc Ferland Committed by Vinod Koul

dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant

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: default avatarMarc Ferland <ferlandm@amotus.ca>
Signed-off-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Link: https://lore.kernel.org/r/1604473206-32573-2-git-send-email-radhey.shyam.pandey@xilinx.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 76866411
...@@ -517,8 +517,8 @@ struct xilinx_dma_device { ...@@ -517,8 +517,8 @@ struct xilinx_dma_device {
#define to_dma_tx_descriptor(tx) \ #define to_dma_tx_descriptor(tx) \
container_of(tx, struct xilinx_dma_tx_descriptor, async_tx) container_of(tx, struct xilinx_dma_tx_descriptor, async_tx)
#define xilinx_dma_poll_timeout(chan, reg, val, cond, delay_us, timeout_us) \ #define xilinx_dma_poll_timeout(chan, reg, val, cond, delay_us, timeout_us) \
readl_poll_timeout(chan->xdev->regs + chan->ctrl_offset + reg, val, \ readl_poll_timeout_atomic(chan->xdev->regs + chan->ctrl_offset + reg, \
cond, delay_us, timeout_us) val, cond, delay_us, timeout_us)
/* IO accessors */ /* IO accessors */
static inline u32 dma_read(struct xilinx_dma_chan *chan, u32 reg) static inline u32 dma_read(struct xilinx_dma_chan *chan, u32 reg)
......
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