OSDN Git Service

iommu/arm-smmu: Don't enable/disable clocks in inv_range_nosync
authorMitchel Humpherys <mitchelh@codeaurora.org>
Tue, 23 Feb 2016 21:35:08 +0000 (13:35 -0800)
committerJeevan Shriram <jshriram@codeaurora.org>
Sat, 21 May 2016 02:24:05 +0000 (19:24 -0700)
TLB invalidation is done during unmap with clocks already enabled, but
we still have calls to enable/disable clocks in
arm_smmu_tlb_inv_range_nosync.  Remove the extra calls.

CRs-Fixed: 997751
Change-Id: Ic5f890fda6b4fc8bb2dcd5e6ff49050d5a934c31
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
drivers/iommu/arm-smmu.c

index f38eb8e..ce3f871 100644 (file)
@@ -956,6 +956,7 @@ static void arm_smmu_tlb_inv_context(void *cookie)
        }
 }
 
+/* Must be called with clocks/regulators enabled */
 static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
                                          bool leaf, void *cookie)
 {
@@ -970,9 +971,6 @@ static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
        if (!smmu)
                return;
 
-       if (arm_smmu_enable_clocks_atomic(smmu))
-               return;
-
        if (stage1) {
                reg = ARM_SMMU_CB_BASE(smmu) + ARM_SMMU_CB(smmu, cfg->cbndx);
                reg += leaf ? ARM_SMMU_CB_S1_TLBIVAL : ARM_SMMU_CB_S1_TLBIVA;
@@ -999,8 +997,6 @@ static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
                reg = ARM_SMMU_GR0(smmu) + ARM_SMMU_GR0_TLBIVMID;
                writel_relaxed(ARM_SMMU_CB_VMID(cfg), reg);
        }
-
-       arm_smmu_disable_clocks_atomic(smmu);
 }
 
 static void arm_smmu_tlbi_domain(struct iommu_domain *domain)