From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 24 Aug 2011 12:20:37 -0400 Subject: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers In-Reply-To: <20110824132553.A5F2C11F9E76@gemini.denx.de> References: <1313745913-28672-1-git-send-email-l.majewski@samsung.com> <20110824120744.097ba2c5@lmajewski.digital.local> <20110824132553.A5F2C11F9E76@gemini.denx.de> Message-ID: <201108241220.39669.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday, August 24, 2011 09:25:53 Wolfgang Denk wrote: > Lukasz Majewski wrote: > > 3. Mike's DMA_DECLARE_BUFFER(, , > > ) > > solution looks OK for me, at least for the stack allocated data (e.g. > > ext_csd). > > However this proposed implementation has been NAK'ed by Wolfgang. > > > > I'm curious how this macro should look like? Is it only matter of code > > reordering or other approach shall be found? > > I think I'd like to see a macro that can be used like this: > > void *dma_buffer_pointer = DMA_BUFFER(size_in_bytes); as Anton highlighted, i'm not sure this is possible. DMA_BUFFER() would have to be defined with ({...}), and any storage declared in there is in new scope, so as soon as you exit that scope, any storage declared is invalid for use outside of it. the only thing that is good for is producing a single value (i.e. an "int" or "char" or a pointer etc..., but not storage). if a person who knows more about gcc internals in this regard could comment, that'd be great :). -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/20110824/2acfba37/attachment.pgp