iommu/rockchip: If shootdown_entire set, not zap, when iommu unmap

Change-Id: I99241903e186da764c1e1ee9042c63de5cf71e74
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This commit is contained in:
Ding Wei 2021-12-17 18:09:55 +08:00 committed by Tao Huang
parent 9e859cce5f
commit 7ffe0e5793

View File

@ -1205,7 +1205,9 @@ static size_t rk_iommu_unmap_v2(struct iommu_domain *domain, unsigned long _iova
spin_unlock_irqrestore(&rk_domain->dt_lock, flags);
/* Shootdown iotlb entries for iova range that was just unmapped */
rk_iommu_zap_iova(rk_domain, iova, unmap_size);
/* Do not zap tlb cache line if shootdown_entire set */
if (!rk_domain->shootdown_entire)
rk_iommu_zap_iova(rk_domain, iova, unmap_size);
return unmap_size;
}