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

Commit 79af4ce2 authored by Laura Abbott's avatar Laura Abbott
Browse files

arm64: Use arm64 coherent APIs for non-coherent freeing



the noncoherent free function currently unconditionally frees
back to the page allocator which is incorrect for CMA pages.
call the coherent free function to correctly differentiate
between pages.

Change-Id: I3b5aae3d77bedff9934e090a1e40e8157d4190df
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 46fe9155
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ static void arm64_swiotlb_free_noncoherent(struct device *dev, size_t size,
	void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle));

	vunmap(vaddr);
	swiotlb_free_coherent(dev, size, swiotlb_addr, dma_handle);
	arm64_swiotlb_free_coherent(dev, size, swiotlb_addr, dma_handle, attrs);
}

static dma_addr_t arm64_swiotlb_map_page(struct device *dev,