Lines Matching defs:mmu

30 static struct msm_iommu_pagetable *to_pagetable(struct msm_mmu *mmu)
32 return container_of(mmu, struct msm_iommu_pagetable, base);
91 static int msm_iommu_pagetable_unmap(struct msm_mmu *mmu, u64 iova,
94 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu);
115 static int msm_iommu_pagetable_map(struct msm_mmu *mmu, u64 iova,
118 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu);
145 msm_iommu_pagetable_unmap(mmu, iova, addr - iova);
154 static void msm_iommu_pagetable_destroy(struct msm_mmu *mmu)
156 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu);
172 int msm_iommu_pagetable_params(struct msm_mmu *mmu,
177 if (mmu->type != MSM_MMU_IOMMU_PAGETABLE)
180 pagetable = to_pagetable(mmu);
191 struct iommu_domain_geometry *msm_iommu_get_geometry(struct msm_mmu *mmu)
193 struct msm_iommu *iommu = to_msm_iommu(mmu);
326 struct msm_mmu *mmu = &iommu->base;
340 if (mmu->funcs->resume_translation)
341 mmu->funcs->resume_translation(mmu);
346 static void msm_iommu_resume_translation(struct msm_mmu *mmu)
348 struct adreno_smmu_priv *adreno_smmu = dev_get_drvdata(mmu->dev);
354 static void msm_iommu_detach(struct msm_mmu *mmu)
356 struct msm_iommu *iommu = to_msm_iommu(mmu);
358 iommu_detach_device(iommu->domain, mmu->dev);
361 static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova,
364 struct msm_iommu *iommu = to_msm_iommu(mmu);
377 static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len)
379 struct msm_iommu *iommu = to_msm_iommu(mmu);
389 static void msm_iommu_destroy(struct msm_mmu *mmu)
391 struct msm_iommu *iommu = to_msm_iommu(mmu);
441 struct msm_mmu *mmu;
443 mmu = msm_iommu_new(dev, quirks);
444 if (IS_ERR_OR_NULL(mmu))
445 return mmu;
447 iommu = to_msm_iommu(mmu);
454 return mmu;