[U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

Mike Frysinger vapier at gentoo.org
Tue Aug 23 22:35:06 CEST 2011


On Tuesday, August 23, 2011 16:12:03 Wolfgang Denk wrote:
> Anton Staaf wrote:
> > > what about adding a new func like:
> > > #define dma_buffer_alloca(size)
> > 
> > I generally avoid large allocations on the stack, they can confuse
> > virtual stack management and blow out small embedded stacks.  But
> > neither of these are really a problem for most U-Boot targets.  Are
> > you thinking something like:
> > 
> > #define dma_buffer_alloca(size) alloca(size + get_dcache_line_size() -
> > 1) & ~(get_dcache_line_size() - 1);
> 
> I don't think I will accept any alloca() based code into mainline.

hmm, for some reason i thought we were using alloca.  but i dont see any 
consumers in u-boot itself.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110823/8eabb85f/attachment.pgp 


More information about the U-Boot mailing list