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

Commit 23b3588c authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

iommu/arm-smmu: respect DOMAIN_ATTR_COHERENT_HTW_DISABLE



If coherent hardware table walks are disabled via the
DOMAIN_ATTR_COHERENT_HTW_DISABLE attribute we need to flush the page
tables to memory every time we touch them.  Do it.

Change-Id: I34189b1312eb294102eeaa59ad46d164777a6789
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 03fd46d0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -823,10 +823,12 @@ static void arm_smmu_flush_pgtable(void *addr, size_t size, void *cookie)
	struct arm_smmu_domain *smmu_domain = cookie;
	struct arm_smmu_device *smmu = smmu_domain->smmu;
	unsigned long offset = (unsigned long)addr & ~PAGE_MASK;
	int coherent_htw_disable = smmu_domain->attributes &
		(1 << DOMAIN_ATTR_COHERENT_HTW_DISABLE);


	/* Ensure new page tables are visible to the hardware walker */
	if (smmu->features & ARM_SMMU_FEAT_COHERENT_WALK) {
	if (!coherent_htw_disable) {
		dsb(ishst);
	} else {
		/*