mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
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: d5aee659f2
("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>
This commit is contained in:
@@ -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)
|
if (cache->buf && cache->block == block && cache->size == size)
|
||||||
return 1;
|
return 1;
|
||||||
ext_cache_fini(cache);
|
ext_cache_fini(cache);
|
||||||
cache->buf = malloc(size);
|
cache->buf = memalign(ARCH_DMA_MINALIGN, size);
|
||||||
if (!cache->buf)
|
if (!cache->buf)
|
||||||
return 0;
|
return 0;
|
||||||
if (!ext4fs_devread(block, 0, size, cache->buf)) {
|
if (!ext4fs_devread(block, 0, size, cache->buf)) {
|
||||||
|
Reference in New Issue
Block a user