common: fix regression on block cache init
PATCH 1/1 common: fix regression on block cache init
From: Angelo Durgehello <[email protected]>
m68k needs block cache list initialized after relocation. Other architectures must not be involved.
Fixing regression related to:
commit 1526bcce0f7285087621e16e6720636d01839da8
("common: add blkcache init")
--- common/board_r.c | 2 +- drivers/block/blkcache.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
common/board_r.c +1 -1
@@ -865,7 +865,7 @@ static init_fnc_t init_sequence_r[] = {#if defined(CONFIG_PRAM ) initr_mem,#endif -#ifdef CONFIG_BLOCK_CACHE +#if defined(CONFIG_M68K ) && defined(CONFIG_BLOCK_CACHE ) blkcache_init, #endif run_main_loop,
drivers/block/blkcache.c +6 -0
@@ -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,
Signature · 1 line
2.24.1
PATCH 1/1 common: fix regression on block cache init
Quoted 11 lines · Angelo Dureghello
From: Angelo Durgehello <[email protected]>
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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200126/c9a2ca50/attachment.sig>
PATCH 1/1 common: fix regression on block cache init
In reply to Angelo DureghelloQuoted 22 lines · Angelo Dureghello
From: Angelo Durgehello <[email protected]>
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 <[email protected]>--- common/board_r.c | 2 +- drivers/block/blkcache.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)common/board_r.c +0
-0
common/board_r.c static init_fnc_t init_sequence_r[] = { · line 868
Quoted 5 lines
common/board_r.c +1
-1@@ -865,7 +865,7 @@ static init_fnc_t init_sequence_r[] = {#if defined(CONFIG_PRAM ) initr_mem,#endif -#ifdef CONFIG_BLOCK_CACHE +#if defined(CONFIG_M68K ) && defined(CONFIG_BLOCK_CACHE )
Sorry for not reacting earlier here, but is this really M68K specific? Or would COFIG_NEES_MANUAL_RELOC be a better fit?
Regards,
Simon
Quoted 36 lines
common/board_r.c +0
-0blkcache_init, #endif run_main_loop,drivers/block/blkcache.c +6
-1@@ -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, --2.24.1
PATCH 1/1 common: fix regression on block cache init
Hi Simon,
sorry for the late reply,
startup assembly code that is actually accessing (re-adjusting) "got" after relocation is in :
microblaze
m68k
I cannot test microblaze stuff btw.
Regards,
Angelo
Quoted 73 lines · Simon Goldschmidt
Quoted 22 lines · Angelo Dureghello
From: Angelo Durgehello <[email protected]>
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 <[email protected]>--- common/board_r.c | 2 +- drivers/block/blkcache.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)common/board_r.c +0
-0common/board_r.c static init_fnc_t init_sequence_r[] = { · line 868
Quoted 5 lines
common/board_r.c +1
-1@@ -865,7 +865,7 @@ static init_fnc_t init_sequence_r[] = {#if defined(CONFIG_PRAM ) initr_mem,#endif -#ifdef CONFIG_BLOCK_CACHE +#if defined(CONFIG_M68K ) && defined(CONFIG_BLOCK_CACHE )Sorry for not reacting earlier here, but is this really M68K specific? Or would
COFIG_NEES_MANUAL_RELOCbe a better fit?Regards,
SimonQuoted 36 lines
common/board_r.c +0
-0blkcache_init, #endif run_main_loop,drivers/block/blkcache.c +6
-1@@ -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, --2.24.1
Signature · 3 lines
Angelo Dureghello Timesys e. angelo.dureghello at timesys.com
PATCH 1/1 common: fix regression on block cache init
In reply to Angelo DureghelloHi Angelo,
Quoted 6 lines · Angelo Dureghello
From: Angelo Durgehello <[email protected]>
m68k needs block cache list initialized after relocation. Other architectures must not be involved.
Quoted 6 lines
Fixing regression related to:
commit
1526bcce0f7285087621e16e6720636d01839da8
("common: add blkcache init")Signed-off-by Angelo Durgehello <[email protected]>
Next time, please consider adding a Reported-by tag.
Thanks
PATCH 1/1 common: fix regression on block cache init
Hi Fabio,
sure, thanks.
Regards,
Angelo
Quoted 13 lines · Fabio Estevam
Hi Angelo,
Quoted 8 lines · Angelo Dureghello
From: Angelo Durgehello <[email protected]>
m68k needs block cache list initialized after relocation. Other architectures must not be involved.
Fixing regression related to:
Quoted 8 lines
Quoted 4 lines
commit
1526bcce0f7285087621e16e6720636d01839da8
("common: add blkcache init")Signed-off-by Angelo Durgehello <[email protected]>Next time, please consider adding a Reported-by tag.
Thanks
--
Angelo Dureghello
Timesys
email: angelo.dureghello at timesys.com
cell.: +39 388 8550663