From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 23 Aug 2011 22:12:03 +0200 Subject: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers In-Reply-To: References: <1313745913-28672-1-git-send-email-l.majewski@samsung.com> <20110823111939.2385daf5@lmajewski.digital.local> <201108231330.15663.vapier@gentoo.org> Message-ID: <20110823201203.B6DCD201520@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Anton Staaf, In message 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