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 1526bcce0f
("common: add blkcache init")
Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
This commit is contained in:
parent
080dbc64fc
commit
c05b38df47
@ -865,7 +865,7 @@ static init_fnc_t init_sequence_r[] = {
|
|||||||
#if defined(CONFIG_PRAM)
|
#if defined(CONFIG_PRAM)
|
||||||
initr_mem,
|
initr_mem,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BLOCK_CACHE
|
#if defined(CONFIG_M68K) && defined(CONFIG_BLOCK_CACHE)
|
||||||
blkcache_init,
|
blkcache_init,
|
||||||
#endif
|
#endif
|
||||||
run_main_loop,
|
run_main_loop,
|
||||||
|
@ -21,19 +21,25 @@ struct block_cache_node {
|
|||||||
char *cache;
|
char *cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef CONFIG_M68K
|
||||||
|
static LIST_HEAD(block_cache);
|
||||||
|
#else
|
||||||
static struct list_head block_cache;
|
static struct list_head block_cache;
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct block_cache_stats _stats = {
|
static struct block_cache_stats _stats = {
|
||||||
.max_blocks_per_entry = 8,
|
.max_blocks_per_entry = 8,
|
||||||
.max_entries = 32
|
.max_entries = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_M68K
|
||||||
int blkcache_init(void)
|
int blkcache_init(void)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(&block_cache);
|
INIT_LIST_HEAD(&block_cache);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct block_cache_node *cache_find(int iftype, int devnum,
|
static struct block_cache_node *cache_find(int iftype, int devnum,
|
||||||
lbaint_t start, lbaint_t blkcnt,
|
lbaint_t start, lbaint_t blkcnt,
|
||||||
|
Loading…
Reference in New Issue
Block a user