From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 8 Jul 2015 18:25:33 -0500 Subject: [U-Boot] [PATCH v2 7/8] mtd/nand/ubi: assortment of alignment fixes In-Reply-To: References: Message-ID: <1436397933.2658.88.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 Wed, 2015-07-08 at 13:58 +0200, 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 > --- > Changes in v2: run it through checkpatch.pl and fix long lines > > common/cmd_ubi.c | 2 +- > drivers/mtd/nand/nand_util.c | 2 +- > fs/ubifs/super.c | 6 ++++-- > fs/ubifs/ubifs.c | 5 +++-- > lib/gzip.c | 2 +- > 5 files changed, 10 insertions(+), 7 deletions(-) As per discussion on v1, this isn't enough to guarantee that the stop address will be aligned. There needs to be a wrapper around memalign() that cache- aligns the size as well. -Scott