Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2d617cb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu: arm-smmu: Save reference to attached devices" into msm-4.9

parents 2ab676b5 ea63baa8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -496,6 +496,7 @@ struct arm_smmu_pte_info {

struct arm_smmu_domain {
	struct arm_smmu_device		*smmu;
	struct device			*dev;
	struct io_pgtable_ops		*pgtbl_ops;
	struct io_pgtable_cfg		pgtbl_cfg;
	spinlock_t			pgtbl_lock;
@@ -1482,7 +1483,8 @@ static void arm_smmu_free_asid(struct iommu_domain *domain)
}

static int arm_smmu_init_domain_context(struct iommu_domain *domain,
					struct arm_smmu_device *smmu)
					struct arm_smmu_device *smmu,
					struct device *dev)
{
	int irq, start, ret = 0;
	unsigned long ias, oas;
@@ -1631,6 +1633,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
	};

	smmu_domain->smmu = smmu;
	smmu_domain->dev = dev;
	pgtbl_ops = alloc_io_pgtable_ops(fmt, &smmu_domain->pgtbl_cfg,
					smmu_domain);
	if (!pgtbl_ops) {
@@ -2119,7 +2122,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
		return ret;

	/* Ensure that the domain is finalised */
	ret = arm_smmu_init_domain_context(domain, smmu);
	ret = arm_smmu_init_domain_context(domain, smmu, dev);
	if (ret < 0)
		goto out_power_off;