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

Commit 13ce73e1 authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

iommu/arm-smmu: Don't enable/disable clocks in inv_range_nosync



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: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent e3b3ce6e
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -947,6 +947,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)
{
@@ -961,9 +962,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;
@@ -990,8 +988,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_flush_pgtable(void *addr, size_t size, void *cookie)