From 1526bcce0f7285087621e16e6720636d01839da8 Mon Sep 17 00:00:00 2001 From: Angelo Durgehello Date: Tue, 21 Jan 2020 10:37:27 +0100 Subject: common: add blkcache init On m68k, block_cache list is relocated, but next and prev list pointers are not adjusted to the relocated struct list_head address, so the first iteration over the block_cache list hangs. This patch initializes the block_cache list after relocation. Signed-off-by: Angelo Durgehello Reviewed-by: Eric Nelson --- include/blk.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/blk.h') diff --git a/include/blk.h b/include/blk.h index d0c033aece..65db69f5d9 100644 --- a/include/blk.h +++ b/include/blk.h @@ -113,6 +113,12 @@ struct blk_desc { (PAD_SIZE(size, blk_desc->blksz)) #if CONFIG_IS_ENABLED(BLOCK_CACHE) + +/** + * blkcache_init() - initialize the block cache list pointers + */ +int blkcache_init(void); + /** * blkcache_read() - attempt to read a set of blocks from cache * -- cgit