[PATCH 02/14] ARM: use memalign in dma_alloc_coherent to assure alignment

Sascha Hauer s.hauer at pengutronix.de
Fri Apr 23 05:03:51 EDT 2010


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/cpu/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 66ee987..5bf31c0 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -99,7 +99,7 @@ void *dma_alloc_coherent(size_t size)
 {
 	void *mem;
 
-	mem = malloc(size);
+	mem = memalign(4096, size);
 	if (mem)
 		return mem + dma_coherent_offset;
 
-- 
1.7.0




More information about the barebox mailing list