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

Wolfgang Denk wd at denx.de
Tue Aug 23 22:12:03 CEST 2011


Dear Anton Staaf,

In message <CAF6FioXeFQP2a0VaZOVOTmxPvJxF4=kamS18=2=p6TFNefwUuA at mail.gmail.com> you 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.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There are three principal ways to lose money: wine, women,  and  en-
gineers.  While  the first two are more pleasant, the third is by far
the more certain."                      -- Baron Rothschild, ca. 1800


More information about the U-Boot mailing list