Lines Matching full:mmu

40 static struct msm_iommu_pagetable *to_pagetable(struct msm_mmu *mmu)  in to_pagetable()  argument
42 return container_of(mmu, struct msm_iommu_pagetable, base); in to_pagetable()
101 static int msm_iommu_pagetable_unmap(struct msm_mmu *mmu, u64 iova, in msm_iommu_pagetable_unmap() argument
104 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu); in msm_iommu_pagetable_unmap()
134 static int msm_iommu_pagetable_map_prr(struct msm_mmu *mmu, u64 iova, size_t len, int prot) in msm_iommu_pagetable_map_prr() argument
136 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu); in msm_iommu_pagetable_map_prr()
156 msm_iommu_pagetable_unmap(mmu, iova, addr - iova); in msm_iommu_pagetable_map_prr()
164 static int msm_iommu_pagetable_map(struct msm_mmu *mmu, u64 iova, in msm_iommu_pagetable_map() argument
168 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu); in msm_iommu_pagetable_map()
175 return msm_iommu_pagetable_map_prr(mmu, iova, len, prot); in msm_iommu_pagetable_map()
212 msm_iommu_pagetable_unmap(mmu, iova, addr - iova); in msm_iommu_pagetable_map()
221 static void msm_iommu_pagetable_destroy(struct msm_mmu *mmu) in msm_iommu_pagetable_destroy() argument
223 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu); in msm_iommu_pagetable_destroy()
248 int msm_iommu_pagetable_params(struct msm_mmu *mmu, in msm_iommu_pagetable_params() argument
253 if (mmu->type != MSM_MMU_IOMMU_PAGETABLE) in msm_iommu_pagetable_params()
256 pagetable = to_pagetable(mmu); in msm_iommu_pagetable_params()
267 struct iommu_domain_geometry *msm_iommu_get_geometry(struct msm_mmu *mmu) in msm_iommu_get_geometry() argument
269 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_get_geometry()
275 msm_iommu_pagetable_walk(struct msm_mmu *mmu, unsigned long iova, uint64_t ptes[4]) in msm_iommu_pagetable_walk() argument
280 if (mmu->type != MSM_MMU_IOMMU_PAGETABLE) in msm_iommu_pagetable_walk()
283 pagetable = to_pagetable(mmu); in msm_iommu_pagetable_walk()
297 msm_iommu_pagetable_prealloc_count(struct msm_mmu *mmu, struct msm_mmu_prealloc *p, in msm_iommu_pagetable_prealloc_count() argument
323 get_pt_cache(struct msm_mmu *mmu) in get_pt_cache() argument
325 struct msm_iommu_pagetable *pagetable = to_pagetable(mmu); in get_pt_cache()
330 msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_prealloc *p) in msm_iommu_pagetable_prealloc_allocate() argument
332 struct kmem_cache *pt_cache = get_pt_cache(mmu); in msm_iommu_pagetable_prealloc_allocate()
351 msm_iommu_pagetable_prealloc_cleanup(struct msm_mmu *mmu, struct msm_mmu_prealloc *p) in msm_iommu_pagetable_prealloc_cleanup() argument
353 struct kmem_cache *pt_cache = get_pt_cache(mmu); in msm_iommu_pagetable_prealloc_cleanup()
660 static void msm_iommu_set_stall(struct msm_mmu *mmu, bool enable) in msm_iommu_set_stall() argument
662 struct adreno_smmu_priv *adreno_smmu = dev_get_drvdata(mmu->dev); in msm_iommu_set_stall()
668 static void msm_iommu_detach(struct msm_mmu *mmu) in msm_iommu_detach() argument
670 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_detach()
672 iommu_detach_device(iommu->domain, mmu->dev); in msm_iommu_detach()
675 static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, in msm_iommu_map() argument
679 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_map()
694 static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len) in msm_iommu_unmap() argument
696 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_unmap()
706 static void msm_iommu_destroy(struct msm_mmu *mmu) in msm_iommu_destroy() argument
708 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_destroy()
761 struct msm_mmu *mmu; in msm_iommu_disp_new() local
763 mmu = msm_iommu_new(dev, quirks); in msm_iommu_disp_new()
764 if (IS_ERR(mmu)) in msm_iommu_disp_new()
765 return mmu; in msm_iommu_disp_new()
767 iommu = to_msm_iommu(mmu); in msm_iommu_disp_new()
770 return mmu; in msm_iommu_disp_new()
777 struct msm_mmu *mmu; in msm_iommu_gpu_new() local
779 mmu = msm_iommu_new(dev, quirks); in msm_iommu_gpu_new()
780 if (IS_ERR(mmu)) in msm_iommu_gpu_new()
781 return mmu; in msm_iommu_gpu_new()
783 iommu = to_msm_iommu(mmu); in msm_iommu_gpu_new()
790 kmem_cache_create("msm-mmu-pt", tblsz, tblsz, 0, NULL); in msm_iommu_gpu_new()
798 return mmu; in msm_iommu_gpu_new()