Skip to content

Commit eb6cf9f

Browse files
committed
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
2 parents 4645453 + 3238c35 commit eb6cf9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/mm/dma-mapping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,9 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size,
429429
prot,
430430
__builtin_return_address(0));
431431
if (addr) {
432-
memset(addr, 0, size);
433432
if (!coherent)
434433
__dma_flush_area(page_to_virt(page), iosize);
434+
memset(addr, 0, size);
435435
} else {
436436
iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs);
437437
dma_release_from_contiguous(dev, page,

0 commit comments

Comments
 (0)