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

* Re: [PATCH] ARM: include: dma: Zero out DMA coherent memory in no-MMU case
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-05-21  9:46 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Mon, May 20, 2019 at 11:33:25AM -0700, Andrey Smirnov wrote:
> 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(+)

Applied, thanks

Sascha


-- 
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
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