Lines Matching refs:iommu

85 	struct msm_iommu *iommu = to_msm_iommu(pagetable->parent);  in msm_iommu_pagetable_destroy()  local
93 if (atomic_dec_return(&iommu->pagetables) == 0) in msm_iommu_pagetable_destroy()
151 struct msm_iommu *iommu = to_msm_iommu(parent); in msm_iommu_pagetable_create() local
168 iommu_set_fault_handler(iommu->domain, msm_fault_handler, iommu); in msm_iommu_pagetable_create()
185 &ttbr0_cfg, iommu->domain); in msm_iommu_pagetable_create()
196 if (atomic_inc_return(&iommu->pagetables) == 1) { in msm_iommu_pagetable_create()
226 struct msm_iommu *iommu = arg; in msm_fault_handler() local
227 struct adreno_smmu_priv *adreno_smmu = dev_get_drvdata(iommu->base.dev); in msm_fault_handler()
235 if (iommu->base.handler) in msm_fault_handler()
236 return iommu->base.handler(iommu->base.arg, iova, flags, ptr); in msm_fault_handler()
251 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_detach() local
253 iommu_detach_device(iommu->domain, mmu->dev); in msm_iommu_detach()
259 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_map() local
266 ret = iommu_map_sgtable(iommu->domain, iova, sgt, prot); in msm_iommu_map()
274 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_unmap() local
279 iommu_unmap(iommu->domain, iova, len); in msm_iommu_unmap()
286 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_destroy() local
287 iommu_domain_free(iommu->domain); in msm_iommu_destroy()
288 kfree(iommu); in msm_iommu_destroy()
301 struct msm_iommu *iommu; in msm_iommu_new() local
307 iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); in msm_iommu_new()
308 if (!iommu) in msm_iommu_new()
311 iommu->domain = domain; in msm_iommu_new()
312 msm_mmu_init(&iommu->base, dev, &funcs, MSM_MMU_IOMMU); in msm_iommu_new()
314 atomic_set(&iommu->pagetables, 0); in msm_iommu_new()
316 ret = iommu_attach_device(iommu->domain, dev); in msm_iommu_new()
318 kfree(iommu); in msm_iommu_new()
322 return &iommu->base; in msm_iommu_new()