[PATCH 2/4] kvx: set DMA_ALIGNMENT instead of defining dma_alloc

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jan 8 02:24:36 PST 2024


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

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

diff --git a/arch/kvx/include/asm/dma.h b/arch/kvx/include/asm/dma.h
index f35eafba8fae..c6f67e76d024 100644
--- a/arch/kvx/include/asm/dma.h
+++ b/arch/kvx/include/asm/dma.h
@@ -6,11 +6,7 @@
 
 #include <common.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




More information about the barebox mailing list