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

Commit 140a526b authored by Zhenhua Huang's avatar Zhenhua Huang Committed by Archana Sriram
Browse files

iommu/arm-smmu: Allocate non-coherent memory for secure pagetables



Allocate non-coherent memory for secure page tables which ensure
that the cache is clean before passing it to TZ.

Fixes: 8836cfda582e3 ("iommu: Do not set COHERENT flag for secure pagetable allocation")
Change-Id: I544c2c37e12e0597a6d452779fbe0186163b4578
Signed-off-by: default avatarZhenhua Huang <zhenhuah@codeaurora.org>
Signed-off-by: default avatarArchana Sriram <apsrir@codeaurora.org>
parent 5475cd6f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ int msm_iommu_sec_pgtbl_init(void)
	/* Now allocate memory for the secure page tables */
	attrs = DMA_ATTR_NO_KERNEL_MAPPING;
	dev.coherent_dma_mask = DMA_BIT_MASK(sizeof(dma_addr_t) * 8);
	arch_setup_dma_ops(&dev, 0, 0, NULL, 0);
	cpu_addr = dma_alloc_attrs(&dev, psize[0], &paddr, GFP_KERNEL, attrs);
	if (!cpu_addr) {
		pr_err("%s: Failed to allocate %d bytes for PTBL\n",