From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 2 Jul 2015 16:35:19 -0500 Subject: [U-Boot] [PATCH 7/8] mtd/nand/ubi: assortment of alignment fixes In-Reply-To: <201507020753.36195.marex@denx.de> References: <201507020753.36195.marex@denx.de> Message-ID: <1435872919.10531.1.camel@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2015-07-02 at 07:53 +0200, Marek Vasut wrote: > On Thursday, July 02, 2015 at 01:04:52 AM, Marcel Ziswiler wrote: > > From: Marcel Ziswiler > > > > Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer > > alignment into account which led to failures of the following form: > > > > ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108 > > ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108 > > > > Signed-off-by: Marcel Ziswiler > > What about using ALLOC_CACHE_ALIGN_BUFFER() and friends instead ? See > include/common.h for their definition, this is what those functions are > exactly for. ALLOC_CACHE_ALIGN_BUFFER() is for statically allocating an aligned buffer. Dynamically allocating an aligned buffer is exactly what memalign() is for. -Scott