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