[U-Boot] [PATCH v2 7/8] mtd/nand/ubi: assortment of alignment fixes

Marcel Ziswiler marcel at ziswiler.com
Thu Jul 9 09:47:56 CEST 2015


Hi Scott

On Wed, 2015-07-08 at 18:25 -0500, Scott Wood wrote:
>
> As per discussion on v1, this isn't enough to guarantee that the stop address 
> will be aligned.  There needs to be a wrapper around memalign() that cache-
> aligns the size as well.
> 
> -Scott

Sorry, that isn't quite clear to me yet. You're saying I would need to
handle that in this patch?

Looking through the sources I actually found only one single usage of
memalign() which explicitly takes care of this the way you propose:

drivers/usb/host/xhci-mem.c:	ptr = memalign(cacheline_size, ALIGN(size,
cacheline_size));

I'm just wondering about the 107 other places in U-Boot where memalign()
is already used the way I do in this patch.

Wouldn't there need to be an infrastructure solution done to e.g.
memalign() itself?

Cheers

Marcel



More information about the U-Boot mailing list