mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: include: dma: Zero out DMA coherent memory in no-MMU case
@ 2019-05-20 18:33 Andrey Smirnov
  2019-05-21  9:46 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2019-05-20 18:33 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

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

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-21  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20 18:33 [PATCH] ARM: include: dma: Zero out DMA coherent memory in no-MMU case Andrey Smirnov
2019-05-21  9:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox