From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 23 Aug 2011 23:00:59 -0400 Subject: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers In-Reply-To: <20110823224246.7F11411F9E62@gemini.denx.de> References: <1313745913-28672-1-git-send-email-l.majewski@samsung.com> <201108231732.39791.vapier@gentoo.org> <20110823224246.7F11411F9E62@gemini.denx.de> Message-ID: <201108232301.01270.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 Tuesday, August 23, 2011 18:42:46 Wolfgang Denk wrote: > Mike Frysinger wrote: > > > Why cannot we define a macro that declares a (sufficiently sized) > > > buffer on the stack and provides and a pointer to a (correctly > > > aligned) address in this buffer? > > > > isnt that what i already posted and you NAK-ed ? :) > > > > DMA_DECLARE_BUFFER(...) > > I just NAKed this specific implementation. well, it's hard to come up with a "good" one without knowing the parameters to work within ;). i'm not stuck on any particular implementation, i just want the helper to be simple to use and hard to screw up. the trouble with doing something like: char foo[func_to_do_round(size)]; is that "size" is not in # of bytes but is number of elements. so the point of my (i dont deny) complicated cpp logic was so that the internal implementation took on more of the work leaving the user (which we all know can easily mess things up) with a very simple macro: DMA_DECLARE_BUFFER(, , ); -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/efdc04dd/attachment.pgp