Loading drivers/iommu/arm-smmu.c +26 −2 Original line number Diff line number Diff line Loading @@ -1366,6 +1366,28 @@ static struct iommu_gather_ops arm_smmu_gather_ops = { .free_pages_exact = arm_smmu_free_pages_exact, }; static void msm_smmu_tlb_inv_context(void *cookie) { } static void msm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size, size_t granule, bool leaf, void *cookie) { } static void msm_smmu_tlb_sync(void *cookie) { } static struct iommu_gather_ops msm_smmu_gather_ops = { .tlb_flush_all = msm_smmu_tlb_inv_context, .tlb_add_flush = msm_smmu_tlb_inv_range_nosync, .tlb_sync = msm_smmu_tlb_sync, .alloc_pages_exact = arm_smmu_alloc_pages_exact, .free_pages_exact = arm_smmu_free_pages_exact, }; static phys_addr_t arm_smmu_verify_fault(struct iommu_domain *domain, dma_addr_t iova, u32 fsr) { Loading Loading @@ -1887,6 +1909,9 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, if (smmu->options & ARM_SMMU_OPT_MMU500_ERRATA1) tlb = &qsmmuv500_errata1_smmu_gather_ops; if (arm_smmu_is_slave_side_secure(smmu_domain)) tlb = &msm_smmu_gather_ops; ret = arm_smmu_alloc_cb(domain, smmu, dev); if (ret < 0) goto out_unlock; Loading @@ -1907,6 +1932,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, .sec_id = smmu->sec_id, .cbndx = cfg->cbndx, }, .tlb = tlb, .iommu_dev = smmu->dev, }; fmt = ARM_MSM_SECURE; Loading Loading @@ -2277,8 +2303,6 @@ static void arm_smmu_domain_remove_master(struct arm_smmu_domain *smmu_domain, const struct iommu_gather_ops *tlb; tlb = smmu_domain->pgtbl_cfg.tlb; if (!tlb) return; mutex_lock(&smmu->stream_map_mutex); for_each_cfg_sme(fwspec, i, idx) { Loading Loading
drivers/iommu/arm-smmu.c +26 −2 Original line number Diff line number Diff line Loading @@ -1366,6 +1366,28 @@ static struct iommu_gather_ops arm_smmu_gather_ops = { .free_pages_exact = arm_smmu_free_pages_exact, }; static void msm_smmu_tlb_inv_context(void *cookie) { } static void msm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size, size_t granule, bool leaf, void *cookie) { } static void msm_smmu_tlb_sync(void *cookie) { } static struct iommu_gather_ops msm_smmu_gather_ops = { .tlb_flush_all = msm_smmu_tlb_inv_context, .tlb_add_flush = msm_smmu_tlb_inv_range_nosync, .tlb_sync = msm_smmu_tlb_sync, .alloc_pages_exact = arm_smmu_alloc_pages_exact, .free_pages_exact = arm_smmu_free_pages_exact, }; static phys_addr_t arm_smmu_verify_fault(struct iommu_domain *domain, dma_addr_t iova, u32 fsr) { Loading Loading @@ -1887,6 +1909,9 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, if (smmu->options & ARM_SMMU_OPT_MMU500_ERRATA1) tlb = &qsmmuv500_errata1_smmu_gather_ops; if (arm_smmu_is_slave_side_secure(smmu_domain)) tlb = &msm_smmu_gather_ops; ret = arm_smmu_alloc_cb(domain, smmu, dev); if (ret < 0) goto out_unlock; Loading @@ -1907,6 +1932,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, .sec_id = smmu->sec_id, .cbndx = cfg->cbndx, }, .tlb = tlb, .iommu_dev = smmu->dev, }; fmt = ARM_MSM_SECURE; Loading Loading @@ -2277,8 +2303,6 @@ static void arm_smmu_domain_remove_master(struct arm_smmu_domain *smmu_domain, const struct iommu_gather_ops *tlb; tlb = smmu_domain->pgtbl_cfg.tlb; if (!tlb) return; mutex_lock(&smmu->stream_map_mutex); for_each_cfg_sme(fwspec, i, idx) { Loading