All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ovidiu Panait <ovidiu.panait@windriver.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 14/14] common/board_r: Move blkcache_init call earlier in the boot sequence
Date: Fri, 10 Jul 2020 13:19:07 +0300	[thread overview]
Message-ID: <20200710101907.11214-14-ovidiu.panait@windriver.com> (raw)
In-Reply-To: <20200710101907.11214-1-ovidiu.panait@windriver.com>

blkcache_init manually relocates blkcache list pointers when
CONFIG_NEEDS_MANUAL_RELOC is enabled. However, it is called very late in
the boot sequence, which could be a problem if previous boot calls execute
blkcache operations with the non-relocated pointers. For example, mmc is
initialized earlier and might call blkcache_invalidate (in
mmc_select_hwpart()) when trying to load the environment from mmc via
env_load().

To fix this issue, move blkcache_init boot call earlier, before mmc gets
initialized.

Cc: Angelo Durgehello <angelo.dureghello@timesys.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---
v2 updates:
- add reviewed-by tag

 common/board_r.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/board_r.c b/common/board_r.c
index 29d831d5eb..a3c26bb380 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -705,6 +705,9 @@ static init_fnc_t init_sequence_r[] = {
 	initr_watchdog,
 #endif
 	INIT_FUNC_WATCHDOG_RESET
+#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_BLOCK_CACHE)
+	blkcache_init,
+#endif
 #ifdef CONFIG_NEEDS_MANUAL_RELOC
 	initr_manual_reloc_cmdtable,
 #endif
@@ -835,9 +838,6 @@ static init_fnc_t init_sequence_r[] = {
 #endif
 #if defined(CONFIG_PRAM)
 	initr_mem,
-#endif
-#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_BLOCK_CACHE)
-	blkcache_init,
 #endif
 	run_main_loop,
 };
-- 
2.17.1

  parent reply	other threads:[~2020-07-10 10:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 10:18 [PATCH v2 01/14] Kconfig: Introduce CONFIG_SYS_HAS_SRAM Ovidiu Panait
2020-07-10 10:18 ` [PATCH v2 02/14] Kconfig: Convert CONFIG_SYS_SRAM_BASE to Kconfig Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:18 ` [PATCH v2 03/14] Kconfig: Convert CONFIG_SYS_SRAM_SIZE " Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:18 ` [PATCH v2 04/14] Kconfig: Remove CONFIG_SYS_SRAM_START Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:18 ` [PATCH v2 05/14] board_f: Introduce arch_setup_bdinfo initcall Ovidiu Panait
2020-07-10 10:18 ` [PATCH v2 06/14] board_f: m68k: Factor out m68k-specific bdinfo setup Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-15 14:07     ` Ovidiu Panait
2020-07-16 15:44       ` Simon Glass
2020-07-10 10:19 ` [PATCH v2 07/14] board_f: ppc: Factor out ppc-specific " Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:19 ` [PATCH v2 08/14] board_f: sh: Factor out sh-specific " Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:19 ` [PATCH v2 09/14] board_f: mips: Factor out mips-specific " Ovidiu Panait
2020-07-15  1:05   ` Simon Glass
2020-07-10 10:19 ` [PATCH v2 10/14] dm: blk: Use IS_ENABLED() instead of #ifdefs in blk_post_probe Ovidiu Panait
2020-07-10 10:19 ` [PATCH v2 11/14] drivers: serial: Make serial_initialize return int Ovidiu Panait
2020-07-10 10:19 ` [PATCH v2 12/14] common/board_r: Remove initr_serial wrapper Ovidiu Panait
2020-07-10 10:19 ` [PATCH v2 13/14] blkcache: Extend blkcache_init to cover CONFIG_NEEDS_MANUAL_RELOC Ovidiu Panait
2020-07-15 19:29   ` Eric Nelson
2020-07-10 10:19 ` Ovidiu Panait [this message]
2020-07-13 17:23   ` [PATCH v2 14/14] common/board_r: Move blkcache_init call earlier in the boot sequence Angelo Dureghello
2020-07-15  1:05 ` [PATCH v2 01/14] Kconfig: Introduce CONFIG_SYS_HAS_SRAM Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200710101907.11214-14-ovidiu.panait@windriver.com \
    --to=ovidiu.panait@windriver.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.