Lines Matching refs:qcom_domain

116 	struct qcom_iommu_domain *qcom_domain = cookie;
117 struct iommu_fwspec *fwspec = qcom_domain->fwspec;
121 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
135 struct qcom_iommu_domain *qcom_domain = cookie;
136 struct iommu_fwspec *fwspec = qcom_domain->fwspec;
140 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
150 struct qcom_iommu_domain *qcom_domain = cookie;
151 struct iommu_fwspec *fwspec = qcom_domain->fwspec;
157 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
220 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
227 mutex_lock(&qcom_domain->init_mutex);
228 if (qcom_domain->iommu)
239 qcom_domain->iommu = qcom_iommu;
240 qcom_domain->fwspec = fwspec;
242 pgtbl_ops = alloc_io_pgtable_ops(ARM_32_LPAE_S1, &pgtbl_cfg, qcom_domain);
255 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
311 mutex_unlock(&qcom_domain->init_mutex);
314 qcom_domain->pgtbl_ops = pgtbl_ops;
319 qcom_domain->iommu = NULL;
321 mutex_unlock(&qcom_domain->init_mutex);
327 struct qcom_iommu_domain *qcom_domain;
334 qcom_domain = kzalloc(sizeof(*qcom_domain), GFP_KERNEL);
335 if (!qcom_domain)
338 mutex_init(&qcom_domain->init_mutex);
339 spin_lock_init(&qcom_domain->pgtbl_lock);
341 return &qcom_domain->domain;
346 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
348 if (qcom_domain->iommu) {
355 pm_runtime_get_sync(qcom_domain->iommu->dev);
356 free_io_pgtable_ops(qcom_domain->pgtbl_ops);
357 pm_runtime_put_sync(qcom_domain->iommu->dev);
360 kfree(qcom_domain);
366 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
385 if (qcom_domain->iommu != qcom_iommu)
395 struct qcom_iommu_domain *qcom_domain;
403 qcom_domain = to_qcom_iommu_domain(domain);
404 if (WARN_ON(!qcom_domain->iommu))
409 struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]);
435 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
436 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops;
441 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags);
443 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags);
453 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
454 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops;
464 pm_runtime_get_sync(qcom_domain->iommu->dev);
465 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags);
467 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags);
468 pm_runtime_put_sync(qcom_domain->iommu->dev);
475 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
476 struct io_pgtable *pgtable = container_of(qcom_domain->pgtbl_ops,
478 if (!qcom_domain->pgtbl_ops)
481 pm_runtime_get_sync(qcom_domain->iommu->dev);
483 pm_runtime_put_sync(qcom_domain->iommu->dev);
497 struct qcom_iommu_domain *qcom_domain = to_qcom_iommu_domain(domain);
498 struct io_pgtable_ops *ops = qcom_domain->pgtbl_ops;
503 spin_lock_irqsave(&qcom_domain->pgtbl_lock, flags);
505 spin_unlock_irqrestore(&qcom_domain->pgtbl_lock, flags);