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

Commit bf4e1bea authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

iommu/arm-smmu: Ensure power resources are enabled during tlb maintenance



arm_smmu_iotlb_sync can be called outside of arm_smmu_unmap, meaning
that the power resources required to access the SMMU register space
may be disabled. Thus, call arm_smmu_power_[on/off] when invoking
arm_smmu_iotlb_sync and arm_smmu_flush_iotlb_all.

Change-Id: I9f6ec0db9b0e25a5c4bf2b0adb3fb950e6843a86
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 5927fac0
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -3232,7 +3232,13 @@ static void arm_smmu_flush_iotlb_all(struct iommu_domain *domain)

	if (smmu_domain->flush_ops) {
		arm_smmu_rpm_get(smmu);
		if (arm_smmu_domain_power_on(domain, smmu)) {
			WARN_ON(1);
			arm_smmu_rpm_put(smmu);
			return;
		}
		smmu_domain->flush_ops->tlb.tlb_ops.tlb_flush_all(smmu_domain);
		arm_smmu_domain_power_off(domain, smmu);
		arm_smmu_rpm_put(smmu);
	}
}
@@ -3245,7 +3251,13 @@ static void arm_smmu_iotlb_sync(struct iommu_domain *domain,

	if (smmu_domain->flush_ops) {
		arm_smmu_rpm_get(smmu);
		if (arm_smmu_domain_power_on(domain, smmu)) {
			WARN_ON(1);
			arm_smmu_rpm_put(smmu);
			return;
		}
		smmu_domain->flush_ops->tlb_sync(smmu_domain);
		arm_smmu_domain_power_off(domain, smmu);
		arm_smmu_rpm_put(smmu);
	}
}