summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/sun50i-iommu.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2020-06-28 20:08:43 +0200
committerJoerg Roedel <jroedel@suse.de>2020-06-30 12:05:09 +0200
commitbc8784f348836ab8967e6116486c5079c7025999 (patch)
treeeeda1df49b3a8617ccb6d3b40c623b8605e47357 /drivers/iommu/sun50i-iommu.c
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff)
downloadlinux-stable-bc8784f348836ab8967e6116486c5079c7025999.tar.gz
linux-stable-bc8784f348836ab8967e6116486c5079c7025999.tar.bz2
linux-stable-bc8784f348836ab8967e6116486c5079c7025999.zip
iommu/sun50i: Change the readl timeout to the atomic variant
The flush_all_tlb call back can be called from an atomic context, so using readl_poll_timeout that embeds a udelay doesn't work. Fixes: 4100b8c229b3 ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20200628180844.79205-1-maxime@cerno.tech Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/sun50i-iommu.c')
-rw-r--r--drivers/iommu/sun50i-iommu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c
index fce605e96aa2..a1563b54c743 100644
--- a/drivers/iommu/sun50i-iommu.c
+++ b/drivers/iommu/sun50i-iommu.c
@@ -313,9 +313,9 @@ static int sun50i_iommu_flush_all_tlb(struct sun50i_iommu *iommu)
IOMMU_TLB_FLUSH_MICRO_TLB(1) |
IOMMU_TLB_FLUSH_MICRO_TLB(0));
- ret = readl_poll_timeout(iommu->base + IOMMU_TLB_FLUSH_REG,
- reg, !reg,
- 1, 2000);
+ ret = readl_poll_timeout_atomic(iommu->base + IOMMU_TLB_FLUSH_REG,
+ reg, !reg,
+ 1, 2000);
if (ret)
dev_warn(iommu->dev, "TLB Flush timed out!\n");