From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 30 Nov 2017 10:36:42 -0500 Subject: [U-Boot] fat: Use cache aligned buffers for fat_opendir In-Reply-To: <1511513681-12636-1-git-send-email-narmstrong@baylibre.com> References: <1511513681-12636-1-git-send-email-narmstrong@baylibre.com> Message-ID: <20171130153642.GG3587@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Nov 24, 2017 at 09:54:41AM +0100, Neil Armstrong wrote: > Before this patch one could receive following errors when executing "fatls" > command on machine with cache enabled (ex i.MX6Q) : > > => fatls mmc 0:1 > CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8] > CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8] > ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4f59dfc8 > ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4f59e7c8 > CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8] > CACHE: Misaligned operation at range [4f59dfc8, 4f59e7c8] > ERROR: v7_outer_cache_inval_range - start address is not aligned - 0x4f59dfc8 > ERROR: v7_outer_cache_inval_range - stop address is not aligned - 0x4f59e7c8 > > To alleviate this problem - the calloc()s have been replaced with > malloc_cache_aligned() and memset(). > > After those changes the buffers are properly aligned (with both start > address and size) to SoC cache line. > > Fixes: 09fa964bba80 ("fs/fat: Fix 'CACHE: Misaligned operation at range' warnings") > Suggested-by: Lukasz Majewski > Signed-off-by: Neil Armstrong > Reviewed-by: Lukasz Majewski > Reviewed-by: Fabio Estevam Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: