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

Commit 1ded748a authored by Neeti Desai's avatar Neeti Desai Committed by Patrick Daly
Browse files

arm64: Pass the correct coherent flag for iommu operations



The memory to be mapped by the smmu needs to be uncached
since the bus is non-coherent. Pass coherent flag as false
to make sure that the memory is marked as uncached.

CRs-Fixed: 786121
Change-Id: Ie2849b1e1ec901e60e89706519cbd89d278e0b3e
Signed-off-by: default avatarNeeti Desai <neetid@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 38f66a4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1393,7 +1393,7 @@ static void __iommu_free_atomic(struct device *dev, void *cpu_addr,
static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
	    dma_addr_t *handle, gfp_t gfp, unsigned long attrs)
{
	pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, true);
	pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, false);
	struct page **pages;
	void *addr = NULL;

@@ -1445,7 +1445,7 @@ static int arm_iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
	unsigned long usize = vma->vm_end - vma->vm_start;
	struct page **pages = __iommu_get_pages(cpu_addr, attrs);

	vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, true);
	vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, false);

	if (!pages)
		return -ENXIO;