Loading drivers/iommu/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,17 @@ config IOMMU_FORCE_4K_MAPPINGS If unsure, say N here. config MSM_IOMMU_TLBINVAL_ON_MAP bool "Invalidates the SMMU TLB on map" depends on MSM_IOMMU help Say Y here if you want to invalidate the SMMU TLB during map operations. This feature needs to be enabled only on older targets which have a hardware bug and need the TLB to be invalidated on all map and map range calls. If unsure, say Y here. # AMD IOMMU support config AMD_IOMMU bool "AMD IOMMU support" Loading drivers/iommu/msm_iommu-v1.c +6 −0 Original line number Diff line number Diff line Loading @@ -971,7 +971,10 @@ static int msm_iommu_map(struct iommu_domain *domain, unsigned long va, if (ret) goto fail; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP ret = __flush_iotlb_va(domain, va); #endif fail: mutex_unlock(&msm_iommu_lock); return ret; Loading Loading @@ -1023,7 +1026,10 @@ static int msm_iommu_map_range(struct iommu_domain *domain, unsigned int va, if (ret) goto fail; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP __flush_iotlb(domain); #endif fail: mutex_unlock(&msm_iommu_lock); return ret; Loading drivers/iommu/msm_iommu_sec.c +8 −0 Original line number Diff line number Diff line Loading @@ -467,7 +467,11 @@ static int msm_iommu_sec_ptbl_map(struct msm_iommu_drvdata *iommu_drvdata, map.info.ctx_id = ctx_drvdata->num; map.info.va = va; map.info.size = len; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP map.flags = IOMMU_TLBINVAL_FLAG; #else map.flags = 0; #endif flush_va = &pa; flush_pa = virt_to_phys(&pa); Loading Loading @@ -517,7 +521,11 @@ static int msm_iommu_sec_ptbl_map_range(struct msm_iommu_drvdata *iommu_drvdata, map.info.ctx_id = ctx_drvdata->num; map.info.va = va; map.info.size = len; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP map.flags = IOMMU_TLBINVAL_FLAG; #else map.flags = 0; #endif if (sg->length == len) { pa = get_phys_addr(sg); Loading Loading
drivers/iommu/Kconfig +11 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,17 @@ config IOMMU_FORCE_4K_MAPPINGS If unsure, say N here. config MSM_IOMMU_TLBINVAL_ON_MAP bool "Invalidates the SMMU TLB on map" depends on MSM_IOMMU help Say Y here if you want to invalidate the SMMU TLB during map operations. This feature needs to be enabled only on older targets which have a hardware bug and need the TLB to be invalidated on all map and map range calls. If unsure, say Y here. # AMD IOMMU support config AMD_IOMMU bool "AMD IOMMU support" Loading
drivers/iommu/msm_iommu-v1.c +6 −0 Original line number Diff line number Diff line Loading @@ -971,7 +971,10 @@ static int msm_iommu_map(struct iommu_domain *domain, unsigned long va, if (ret) goto fail; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP ret = __flush_iotlb_va(domain, va); #endif fail: mutex_unlock(&msm_iommu_lock); return ret; Loading Loading @@ -1023,7 +1026,10 @@ static int msm_iommu_map_range(struct iommu_domain *domain, unsigned int va, if (ret) goto fail; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP __flush_iotlb(domain); #endif fail: mutex_unlock(&msm_iommu_lock); return ret; Loading
drivers/iommu/msm_iommu_sec.c +8 −0 Original line number Diff line number Diff line Loading @@ -467,7 +467,11 @@ static int msm_iommu_sec_ptbl_map(struct msm_iommu_drvdata *iommu_drvdata, map.info.ctx_id = ctx_drvdata->num; map.info.va = va; map.info.size = len; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP map.flags = IOMMU_TLBINVAL_FLAG; #else map.flags = 0; #endif flush_va = &pa; flush_pa = virt_to_phys(&pa); Loading Loading @@ -517,7 +521,11 @@ static int msm_iommu_sec_ptbl_map_range(struct msm_iommu_drvdata *iommu_drvdata, map.info.ctx_id = ctx_drvdata->num; map.info.va = va; map.info.size = len; #ifdef CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP map.flags = IOMMU_TLBINVAL_FLAG; #else map.flags = 0; #endif if (sg->length == len) { pa = get_phys_addr(sg); Loading