[PATCH] ARM: include: dma: Zero out DMA coherent memory in no-MMU case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add code to match the behavior of dma_alloc_coherent() when CONFIG_MMU
is selected.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 arch/arm/include/asm/dma.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index bb7e62af0..15999a524 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -20,6 +20,8 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
 	if (dma_handle)
 		*dma_handle = (dma_addr_t)ret;
 
+	memset(ret, 0, size);
+
 	return ret;
 }
 
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux