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

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

Merge "iommu: smmu: Power on smmu during ATOS operation" into msm-4.14

parents f606c74b 49c3024c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2531,11 +2531,14 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
	unsigned long flags;
	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);

	if (arm_smmu_power_on(smmu_domain->smmu->pwr))
		return 0;

	if (smmu_domain->smmu->arch_ops &&
	    smmu_domain->smmu->arch_ops->iova_to_phys_hard) {
		ret = smmu_domain->smmu->arch_ops->iova_to_phys_hard(
						domain, iova);
		return ret;
		goto out;
	}

	spin_lock_irqsave(&smmu_domain->cb_lock, flags);
@@ -2545,6 +2548,9 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,

	spin_unlock_irqrestore(&smmu_domain->cb_lock, flags);

out:
	arm_smmu_power_off(smmu_domain->smmu->pwr);

	return ret;
}