Message ID | 20170116140427.29283-26-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 4acff4524783d860d873e131057602e43b8294f9 |
Delegated to: | Bin Meng |
Headers | show |
On Mon, Jan 16, 2017 at 10:03 PM, Simon Glass <sjg@chromium.org> wrote: > These tables should be declared static const. Unfortunately the table in > board_r is updated on machines with manual relocation. > > Update them. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v3: > - Add new patch to use static const for the board_f/r init sequences > > Changes in v2: None > > common/board_f.c | 4 ++-- > common/board_r.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
On Tue, Jan 17, 2017 at 10:27 AM, Bin Meng <bmeng.cn@gmail.com> wrote: > On Mon, Jan 16, 2017 at 10:03 PM, Simon Glass <sjg@chromium.org> wrote: >> These tables should be declared static const. Unfortunately the table in >> board_r is updated on machines with manual relocation. >> >> Update them. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> >> --- >> >> Changes in v3: >> - Add new patch to use static const for the board_f/r init sequences >> >> Changes in v2: None >> >> common/board_f.c | 4 ++-- >> common/board_r.c | 2 +- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com> applied to u-boot-x86, thanks!
diff --git a/common/board_f.c b/common/board_f.c index 3555ffafee4..0b135e4fe1b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -846,7 +846,7 @@ __weak int arch_cpu_init_dm(void) return 0; } -static init_fnc_t init_sequence_f[] = { +static const init_fnc_t init_sequence_f[] = { #ifdef CONFIG_SANDBOX setup_ram_buf, #endif @@ -1108,7 +1108,7 @@ void board_init_f(ulong boot_flags) * NOTE: At present only x86 uses this route, but it is intended that * all archs will move to this when generic relocation is implemented. */ -static init_fnc_t init_sequence_f_r[] = { +static const init_fnc_t init_sequence_f_r[] = { #if !CONFIG_IS_ENABLED(X86_64) init_cache_f_r, #endif diff --git a/common/board_r.c b/common/board_r.c index a3733526c69..1bdd5a35366 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -757,7 +757,7 @@ static int run_main_loop(void) * * TODO: perhaps reset the watchdog in the initcall function after each call? */ -init_fnc_t init_sequence_r[] = { +static init_fnc_t init_sequence_r[] = { initr_trace, initr_reloc, /* TODO: could x86/PPC have this also perhaps? */
These tables should be declared static const. Unfortunately the table in board_r is updated on machines with manual relocation. Update them. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v3: - Add new patch to use static const for the board_f/r init sequences Changes in v2: None common/board_f.c | 4 ++-- common/board_r.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)