From c765bad7cc44f35e0056f7443a676d344dea2d38 Mon Sep 17 00:00:00 2001 From: Prakash Gupta Date: Fri, 4 Dec 2020 00:20:32 +0530 Subject: [PATCH] iommu: arm-smmu: skip tlb flush during unmap With fragmented physical memory, mappings are generated of lower granule. This increases the unmap latency of large buffers. When not supporting demand paging in smmu, unmap can defer the invalidation till next map. This change aggregates invalidations across multiple unmaps till a new mapping is created on that context. The new mapping can be using an iova previously unmapped hence the stale TLB can cause issue. Hence invalidate the TLB during map. Change-Id: I1d64227ca075067a43075729ba26be684126d679 Signed-off-by: Prakash Gupta --- drivers/iommu/arm-smmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index ebca72dec632..aa609e0ec4e7 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -3288,7 +3288,6 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova, arm_smmu_rpm_get(smmu); spin_lock_irqsave(&smmu_domain->cb_lock, flags); ret = ops->unmap(ops, iova, size, gather); - arm_smmu_deferred_flush(smmu_domain); spin_unlock_irqrestore(&smmu_domain->cb_lock, flags); arm_smmu_rpm_put(smmu);