aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorAngelo Durgehello2020-01-26 19:31:22 +0100
committerTom Rini2020-01-26 13:36:14 -0500
commitc05b38df477a50c3918b50c5f986592411785859 (patch)
tree31bd0ca8c12fe0e7a5be0d296ba2ffc154cee69a /drivers/block
parent080dbc64fcbc9e17ed424778e51b4f3db152ec1e (diff)
common: fix regression on block cache init
m68k needs block cache list initialized after relocation. Other architectures must not be involved. Fixing regression related to: commit 1526bcce0f7285087621e16e6720636d01839da8 ("common: add blkcache init") Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/blkcache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index f603aa129d4..ea40929e3e5 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -21,19 +21,25 @@ struct block_cache_node {
char *cache;
};
+#ifndef CONFIG_M68K
+static LIST_HEAD(block_cache);
+#else
static struct list_head block_cache;
+#endif
static struct block_cache_stats _stats = {
.max_blocks_per_entry = 8,
.max_entries = 32
};
+#ifdef CONFIG_M68K
int blkcache_init(void)
{
INIT_LIST_HEAD(&block_cache);
return 0;
}
+#endif
static struct block_cache_node *cache_find(int iftype, int devnum,
lbaint_t start, lbaint_t blkcnt,