[U-Boot] [PATCH] fat: Use cache aligned buffers for fat_opendir

Fabio Estevam festevam at gmail.com
Fri Nov 24 13:31:11 UTC 2017


Hi Neil,

On Fri, Nov 24, 2017 at 6:54 AM, Neil Armstrong <narmstrong at baylibre.com> 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 <lukma at denx.de>
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>

Thanks for the fix:

Reviewed-by: Fabio Estevam <fabio.estevam at nxp.com>


More information about the U-Boot mailing list