[U-Boot] [PATCH v3 7/8] mtd/nand/ubi: assortment of alignment fixes
Scott Wood
scottwood at freescale.com
Mon Aug 3 23:21:33 CEST 2015
On Mon, 2015-08-03 at 23:15 +0200, Marcel Ziswiler wrote:
> diff --git a/include/malloc.h b/include/malloc.h
> index f4da9e6..5933a94 100644
> --- a/include/malloc.h
> +++ b/include/malloc.h
> @@ -955,6 +955,14 @@ extern ulong mem_malloc_brk;
>
> void mem_malloc_init(ulong start, ulong size);
>
> +#include <asm/cache.h>
> +#include <linux/kernel.h>
> +
> +static inline void *malloc_cache_aligned(size_t size)
> +{
> + return memalign(ARCH_DMA_MINALIGN, ALIGN(size, ARCH_DMA_MINALIGN));
> +}
> +
> #ifdef __cplusplus
> }; /* end of extern "C" */
> #endif
malloc.h is for dlmalloc itself -- please put this somewhere like common.h.
Otherwise, ACK.
-Scott
More information about the U-Boot
mailing list