summaryrefslogtreecommitdiff
path: root/drivers/iommu/mtk_iommu.c
diff options
context:
space:
mode:
authorYong Wu <yong.wu@mediatek.com>2019-11-04 10:01:08 +0300
committerJoerg Roedel <jroedel@suse.de>2019-11-11 17:02:34 +0300
commitc90ae4a63541e05f77815762ddb0f7aee917b083 (patch)
tree00c3a5ba023d112d730c5f0e5be3e6702cf9d829 /drivers/iommu/mtk_iommu.c
parent60829b4d00aa2f45f419ff62fb487063153a1d71 (diff)
downloadlinux-c90ae4a63541e05f77815762ddb0f7aee917b083.tar.xz
iommu/mediatek: Reduce the tlb flush timeout value
Reduce the tlb timeout value from 100000us to 1000us. The original value would make the kernel stuck for 100 ms with interrupts disabled, which could have other side effects. The flush is expected to always take much less than 1 ms, so use that instead. Signed-off-by: Yong Wu <yong.wu@mediatek.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/mtk_iommu.c')
-rw-r--r--drivers/iommu/mtk_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index c2b7ed5d0f7c..8ca2e99964fe 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -192,7 +192,7 @@ static void mtk_iommu_tlb_flush_range_sync(unsigned long iova, size_t size,
/* tlb sync */
ret = readl_poll_timeout_atomic(data->base + REG_MMU_CPE_DONE,
- tmp, tmp != 0, 10, 100000);
+ tmp, tmp != 0, 10, 1000);
if (ret) {
dev_warn(data->dev,
"Partial TLB flush timed out, falling back to full flush\n");