mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
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: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
5927fac03f
commit
bf4e1bea47
1 changed files with 12 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue