mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] sandbox: set DMA_ALIGNMENT instead of defining dma_alloc
@ 2024-01-08 10:24 Ahmad Fatoum
  2024-01-08 10:24 ` [PATCH 2/4] kvx: " Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2024-01-08 10:24 UTC (permalink / raw)
  To: barebox; +Cc: Peter Mamonov, Yann Sionneau, Ahmad Fatoum

<dma.h> will take care to define dma_alloc with DMA_ALIGNMENT as
alignment. As 32 is the default and we for some reason, use 64 for
sandbox, define DMA_ALIGNMENT and drop the now duplicate code.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/sandbox/include/asm/dma.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
index ac8b408aae0b..cafbb7fe6a4c 100644
--- a/arch/sandbox/include/asm/dma.h
+++ b/arch/sandbox/include/asm/dma.h
@@ -12,11 +12,7 @@
 #include <linux/string.h>
 #include <driver.h>
 
-#define dma_alloc dma_alloc
-static inline void *dma_alloc(size_t size)
-{
-	return xmemalign(64, ALIGN(size, 64));
-}
+#define DMA_ALIGNMENT	64
 
 #define dma_alloc_coherent dma_alloc_coherent
 static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
-- 
2.39.2




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

end of thread, other threads:[~2024-01-10  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 10:24 [PATCH 1/4] sandbox: set DMA_ALIGNMENT instead of defining dma_alloc Ahmad Fatoum
2024-01-08 10:24 ` [PATCH 2/4] kvx: " Ahmad Fatoum
2024-01-08 12:07   ` Yann Sionneau
2024-01-08 10:24 ` [PATCH 3/4] mips: " Ahmad Fatoum
2024-01-08 10:24 ` [PATCH 4/4] dma: don't allow override of dma_alloc/dma_free Ahmad Fatoum
2024-01-10  6:45 ` [PATCH 1/4] sandbox: set DMA_ALIGNMENT instead of defining dma_alloc Sascha Hauer

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