Skip to contentSkip to conversation

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

PATCH Applied Andrey Smirnov 2 participants 2 messages May 20, 2019 – May 21, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: include: dma: Zero out DMA coherent memory in no-MMU case

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

---
 arch/arm/include/asm/dma.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/include/asm/dma.h +2 -0
index bb7e62af0..15999a524 100644
@@ -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;
 }
 
Signature · 7 lines
2.21.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Andrey Smirnov

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

---
 arch/arm/include/asm/dma.h | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox