From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 29 Apr 2015 15:20:10 -0600 Subject: [U-Boot] [PATCH V2] nand: fix buffer alignment in new verification feature In-Reply-To: <1429023540-17709-1-git-send-email-swarren@wwwdotorg.org> References: <1429023540-17709-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <55414B0A.2060603@wwwdotorg.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 04/14/2015 08:59 AM, Stephen Warren wrote: > From: Stephen Warren > > On systems with caches enabled, NAND I/O may need to flush/invalidate > the cache during read/write operations. For this to work correctly, all > buffers must be cache-aligned. Fix nand_verify*() to allocate aligned > buffers. > > This prevents cache alignment warnings from being spewed when using > U-Boot to write an updated version of itself to flash on NVIDIA Tegra > Seaboard (after perturbation of stack/data layout in current > u-boot-dm/next branch). > > I have validatd (executed) nand_verify(), but I don't think I've executed > nand_verify_page_oob(); testing of that would be useful. > > Cc: Peter Tyser > Cc: Heiko Schocher > Cc: Scott Wood > Fixes: 59b5a2ad83df ("nand: Add verification functions") > Signed-off-by: Stephen Warren > --- > v2: Use memalign() rather than ALLOC_CACHE_ALIGN_BUFFER() so that the > buffer is allocated from the heap not on the stack, to reduce stack > usage. Scott, does this version look good?