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

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

iommu/arm-smmu: zero out ptes completely on unmap



Thulium v1 has a hardware bug that requires us to zero out page table
entries completely rather than just setting the valid bits to 0.  The
previous workaround for this [165066b85d: "iommu/arm-smmu: work around
transaction hardware bug"] was actually not quite right since it still
allowed the page frame number to be set in the page table entry.  Fix
this by actually zero'ing out the pte.

Change-Id: I37537874ea4c5d1c00db7de65f70edd93ce63b90
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 7839444b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1694,7 +1694,8 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_domain *smmu_domain,

		do {
			if (!(pteval & ARM_SMMU_PTE_PAGE))
				pteval = 0;
				*pte = 0;
			else
				*pte = pfn_pte(pfn, __pgprot(pteval));
		} while (pte++, pfn++, addr += PAGE_SIZE, --i);
	} while (addr != end);