Revert "drm/rockchip: gem: add IOMMU_TLB_SHOT_ENTIRE when call iommu_map_sg"

This reverts commit 91db0733d7.

Signed-off-by: Simon Xue <xxm@rock-chips.com>
Change-Id: I7842de3f5a7e4a64e570ceb93e82fdee38f78498
This commit is contained in:
Simon Xue
2021-12-07 10:10:19 +08:00
committed by Tao Huang
parent 2e72e95308
commit 540ad49319
4 changed files with 0 additions and 29 deletions

View File

@@ -36,10 +36,6 @@ static int rockchip_gem_iommu_map(struct rockchip_gem_object *rk_obj)
int prot = IOMMU_READ | IOMMU_WRITE;
ssize_t ret;
#ifdef IOMMU_TLB_SHOT_ENTIRE
prot |= IOMMU_TLB_SHOT_ENTIRE;
#endif
mutex_lock(&private->mm_lock);
ret = drm_mm_insert_node_generic(&private->mm, &rk_obj->mm,
rk_obj->base.size, PAGE_SIZE,

View File

@@ -2636,12 +2636,6 @@ static size_t __iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
if (ops->iotlb_sync_map)
ops->iotlb_sync_map(domain, iova, mapped);
#ifdef IOMMU_TLB_SHOT_ENTIRE
if (domain->ops->flush_iotlb_all && (prot & IOMMU_TLB_SHOT_ENTIRE))
domain->ops->flush_iotlb_all(domain);
#endif
return mapped;
out_err:

View File

@@ -989,13 +989,7 @@ static int rk_iommu_map_iova(struct rk_iommu_domain *rk_domain, u32 *pte_addr,
* We only zap the first and last iova, since only they could have
* dte or pte shared with an existing mapping.
*/
#ifdef IOMMU_TLB_SHOT_ENTIRE
/* Do not zap tlb cache line if IOMMU_TLB_SHOT_ENTIRE set */
if (!(prot & IOMMU_TLB_SHOT_ENTIRE))
rk_iommu_zap_iova_first_last(rk_domain, iova, size);
#else
rk_iommu_zap_iova_first_last(rk_domain, iova, size);
#endif
return 0;
unwind:
@@ -1040,13 +1034,7 @@ static int rk_iommu_map_iova_v2(struct rk_iommu_domain *rk_domain, u32 *pte_addr
* We only zap the first and last iova, since only they could have
* dte or pte shared with an existing mapping.
*/
#ifdef IOMMU_TLB_SHOT_ENTIRE
/* Do not zap tlb cache line if IOMMU_TLB_SHOT_ENTIRE set */
if (!(prot & IOMMU_TLB_SHOT_ENTIRE))
rk_iommu_zap_iova_first_last(rk_domain, iova, size);
#else
rk_iommu_zap_iova_first_last(rk_domain, iova, size);
#endif
return 0;
unwind:

View File

@@ -44,13 +44,6 @@
*/
#define IOMMU_SYS_CACHE_NWA (1 << 7)
#ifdef CONFIG_NO_GKI
/* For shoting entire IOMMU tlb once */
#define IOMMU_TLB_SHOT_ENTIRE (1 << 8)
#endif
struct iommu_ops;
struct iommu_group;
struct bus_type;