aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-14 12:36:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-14 12:36:41 -0500
commiteb6cf9f8cb9dfacf6679f9d6c72aaf568a027edf (patch)
tree550279bd510217fb2d5979c47afed75bf817e172
parent4645453cefcebdff9db26f02cf325607357295c4 (diff)
parent3238c359acee4ab57f15abb5a82b8ab38a661ee7 (diff)
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas: "Invalidate the caches before clearing the DMA buffer via the non-cacheable alias in the FORCE_CONTIGUOUS case" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: dma-mapping: Fix FORCE_CONTIGUOUS buffer clearing
-rw-r--r--arch/arm64/mm/dma-mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index a3ac26284845..a53704406099 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -429,9 +429,9 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size,
429 prot, 429 prot,
430 __builtin_return_address(0)); 430 __builtin_return_address(0));
431 if (addr) { 431 if (addr) {
432 memset(addr, 0, size);
433 if (!coherent) 432 if (!coherent)
434 __dma_flush_area(page_to_virt(page), iosize); 433 __dma_flush_area(page_to_virt(page), iosize);
434 memset(addr, 0, size);
435 } else { 435 } else {
436 iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs); 436 iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs);
437 dma_release_from_contiguous(dev, page, 437 dma_release_from_contiguous(dev, page,