Skip to content

Commit bc8784f

Browse files
mripardjoergroedel
authored andcommitted
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: 4100b8c ("iommu: Add Allwinner H6 IOMMU driver") Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9ebcfad commit bc8784f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/iommu/sun50i-iommu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ static int sun50i_iommu_flush_all_tlb(struct sun50i_iommu *iommu)
313313
IOMMU_TLB_FLUSH_MICRO_TLB(1) |
314314
IOMMU_TLB_FLUSH_MICRO_TLB(0));
315315

316-
ret = readl_poll_timeout(iommu->base + IOMMU_TLB_FLUSH_REG,
317-
reg, !reg,
318-
1, 2000);
316+
ret = readl_poll_timeout_atomic(iommu->base + IOMMU_TLB_FLUSH_REG,
317+
reg, !reg,
318+
1, 2000);
319319
if (ret)
320320
dev_warn(iommu->dev, "TLB Flush timed out!\n");
321321

0 commit comments

Comments
 (0)