[PATCH 0/6] fix dma memory allocations, add dma_alloc/dma_free

Marc Kleine-Budde mkl at pengutronix.de
Tue Jun 19 08:36:25 EDT 2012


Hello,

on ARM using dfu mode we've seen problems with dma memory allocations.
Some drivers use dma_inv_range on allocated buffers, which corrupts memory
around the buffer, it it's not aligned to cache lines. This series
introduces: dma_alloc() and dma_free() that allocate memory aligned to
cache lines. This is 64 bytes on ARM (just to be sure) and
DCACHE_LINE_SIZE on nios2. All other arch do a transparent xmalloc.

Feel free to add the appropriate alignment for your architecture to
"include/asm/dma.h"

regards, Marc




More information about the barebox mailing list