From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Yanok Date: Fri, 14 Oct 2011 02:22:11 +0400 Subject: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled In-Reply-To: <4E92F05F.4030501@denx.de> References: <1317857806-16549-1-git-send-email-yanok@emcraft.com> <1317857806-16549-5-git-send-email-yanok@emcraft.com> <4E92E675.1090900@denx.de> <4E92ED38.3010103@emcraft.com> <4E92F05F.4030501@denx.de> Message-ID: <4E976493.7010204@emcraft.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, On 10.10.2011 17:17, Stefano Babic wrote: >>> Should we not be sure that size is rounded up to align with the cache >>> line size ? >> >> Surely we should. Actually it's not the size that has to be aligned but >> the buffer itself. Is there any generic API to get the cache line size? > > There is a CONFIG_SYS_CACHELINE_SIZE. However, I see recent patches that Yes, that's what I need. But it looks like it's defined mostly for the PPC boards.. > can help in our case ( cache: add ALLOC_CACHE_ALIGN_BUFFER macro): > > http://patchwork.ozlabs.org/patch/117698/ Hm.. Well, actually I need to align the static buffer, so I don't need this, __aligned(CONFIG_SYS_CACHELINE_SIZE) does the trick. Regards, Ilya.