Lines Matching refs:qcom_domain

126 	struct qcom_iommu_domain *qcom_domain = cookie;  in qcom_iommu_tlb_sync()  local
127 struct iommu_fwspec *fwspec = qcom_domain->fwspec; in qcom_iommu_tlb_sync()
131 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); in qcom_iommu_tlb_sync()
145 struct qcom_iommu_domain *qcom_domain = cookie; in qcom_iommu_tlb_inv_context() local
146 struct iommu_fwspec *fwspec = qcom_domain->fwspec; in qcom_iommu_tlb_inv_context()
150 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); in qcom_iommu_tlb_inv_context()
160 struct qcom_iommu_domain *qcom_domain = cookie; in qcom_iommu_tlb_inv_range_nosync() local
161 struct iommu_fwspec *fwspec = qcom_domain->fwspec; in qcom_iommu_tlb_inv_range_nosync()
167 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); in qcom_iommu_tlb_inv_range_nosync()
230 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_init_domain() local
237 mutex_lock(&qcom_domain->init_mutex); in qcom_iommu_init_domain()
238 if (qcom_domain->iommu) in qcom_iommu_init_domain()
249 qcom_domain->iommu = qcom_iommu; in qcom_iommu_init_domain()
250 qcom_domain->fwspec = fwspec; in qcom_iommu_init_domain()
252 pgtbl_ops = alloc_io_pgtable_ops(ARM_32_LPAE_S1, &pgtbl_cfg, qcom_domain); in qcom_iommu_init_domain()
265 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); in qcom_iommu_init_domain()
321 mutex_unlock(&qcom_domain->init_mutex); in qcom_iommu_init_domain()
324 qcom_domain->pgtbl_ops = pgtbl_ops; in qcom_iommu_init_domain()
329 qcom_domain->iommu = NULL; in qcom_iommu_init_domain()
331 mutex_unlock(&qcom_domain->init_mutex); in qcom_iommu_init_domain()
337 struct qcom_iommu_domain *qcom_domain; in qcom_iommu_domain_alloc() local
346 qcom_domain = kzalloc(sizeof(*qcom_domain), GFP_KERNEL); in qcom_iommu_domain_alloc()
347 if (!qcom_domain) in qcom_iommu_domain_alloc()
350 mutex_init(&qcom_domain->init_mutex); in qcom_iommu_domain_alloc()
351 spin_lock_init(&qcom_domain->pgtbl_lock); in qcom_iommu_domain_alloc()
353 return &qcom_domain->domain; in qcom_iommu_domain_alloc()
358 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_domain_free() local
360 if (qcom_domain->iommu) { in qcom_iommu_domain_free()
367 pm_runtime_get_sync(qcom_domain->iommu->dev); in qcom_iommu_domain_free()
368 free_io_pgtable_ops(qcom_domain->pgtbl_ops); in qcom_iommu_domain_free()
369 pm_runtime_put_sync(qcom_domain->iommu->dev); in qcom_iommu_domain_free()
372 kfree(qcom_domain); in qcom_iommu_domain_free()
378 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_attach_dev() local
397 if (qcom_domain->iommu != qcom_iommu) in qcom_iommu_attach_dev()
409 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_map() local
410 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops; in qcom_iommu_map()
415 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_map()
417 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_map()
427 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_unmap() local
428 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops; in qcom_iommu_unmap()
438 pm_runtime_get_sync(qcom_domain->iommu->dev); in qcom_iommu_unmap()
439 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_unmap()
441 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_unmap()
442 pm_runtime_put_sync(qcom_domain->iommu->dev); in qcom_iommu_unmap()
449 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_flush_iotlb_all() local
450 struct io_pgtable *pgtable = container_of(qcom_domain->pgtbl_ops, in qcom_iommu_flush_iotlb_all()
452 if (!qcom_domain->pgtbl_ops) in qcom_iommu_flush_iotlb_all()
455 pm_runtime_get_sync(qcom_domain->iommu->dev); in qcom_iommu_flush_iotlb_all()
457 pm_runtime_put_sync(qcom_domain->iommu->dev); in qcom_iommu_flush_iotlb_all()
471 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain); in qcom_iommu_iova_to_phys() local
472 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops; in qcom_iommu_iova_to_phys()
477 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_iova_to_phys()
479 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags); in qcom_iommu_iova_to_phys()