diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2020-03-25 21:27:51 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-03-27 15:42:04 -0400 |
commit | 7b83060b1eab4456b3dfaef636dfd5c0ff705b17 (patch) | |
tree | 60960f6366bb9c1a2f4e77ea4fe9e1a2302a3a81 /fs/ext4/ext4fs.c | |
parent | cb11eed23d7215b6902d43f6273b562ee31e770a (diff) | |
download | u-boot-7b83060b1eab4456b3dfaef636dfd5c0ff705b17.zip u-boot-7b83060b1eab4456b3dfaef636dfd5c0ff705b17.tar.gz u-boot-7b83060b1eab4456b3dfaef636dfd5c0ff705b17.tar.bz2 |
fs: ext4: Fix alignment of cache buffers
We need to align the cache buffer to ARCH_DMA_MINALIGN in order to avoid
access errors like
CACHE: Misaligned operation at range [be0231e0, be0235e0]
seen on the MCIMX7SABRE.
Fixes: d5aee659f217 ("fs: ext4: cache extent data")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Diffstat (limited to 'fs/ext4/ext4fs.c')
-rw-r--r-- | fs/ext4/ext4fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 1c616a2..966b427 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -288,7 +288,7 @@ int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size) if (cache->buf && cache->block == block && cache->size == size) return 1; ext_cache_fini(cache); - cache->buf = malloc(size); + cache->buf = memalign(ARCH_DMA_MINALIGN, size); if (!cache->buf) return 0; if (!ext4fs_devread(block, 0, size, cache->buf)) { |