common/board_f: move board_init_f_mem() from #else CONFIG_X86
PATCH 1/1 common/board_f: move board_init_f_mem() from #else CONFIG_X86
Purpose of this change is to make it possible to re-use code currently used on X86 solely for other architectures. For example:
* init_sequence_f_r
* board_init_f_r
Even though board_init_f_mem() has nothing to do with any particular architecture it won't work (at least in current implementation) for X86.
This is because on X86 "gd" is an alias to function get_fs_gd_ptr(), thus we cannot assign anything to it.
So this change separates selection of board_init_f_mem() from X86 while keeping it disabled for X86 still.
--- common/board_f.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
common/board_f.c +4 -2
@@ -1080,7 +1080,9 @@ void board_init_f_r(void)/* NOTREACHED - board_init_r() does not return */ hang (); } -#else +#endif /* CONFIG_X86 */ + +#ifndef CONFIG_X86 ulong board_init_f_mem (ulong top) {/* Leave space for the stack we are running with now */
@@ -1098,4 +1100,4 @@ ulong board_init_f_mem(ulong top) return top; } -#endif /* CONFIG_X86 */ +#endif /* !CONFIG_X86 */
Signature · 1 line
2.1.0
PATCH 1/1 common/board_f: move board_init_f_mem() from #else CONFIG_X86
Hi Simon, Tom,
Quoted 11 lines · Alexey Brodkin
Purpose of this change is to make it possible to re-use code currently used on X86 solely for other architectures. For example:
*init_sequence_f_r
*board_init_f_rEven though
board_init_f_mem()has nothing to do with any particular architecture it won't work (at least in current implementation) for X86.This is because on X86 "gd" is an alias to function
get_fs_gd_ptr(), thus we cannot assign anything to it.
Quoted 6 lines
So this change separates selection of
board_init_f_mem()from X86 while keeping it disabled for X86 still.Signed-off-by Alexey Brodkin <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>
If there're no objections on this one could it be applied?
This patch is a pre-requisite for ARC-update series, in particular for this patch - http://patchwork.ozlabs.org/patch/450963/
-Alexey
PATCH 1/1 common/board_f: move board_init_f_mem() from #else CONFIG_X86
Quoted 17 lines · Alexey Brodkin
Hi Simon, Tom,
Quoted 14 lines · Alexey Brodkin
Purpose of this change is to make it possible to re-use code currently used on X86 solely for other architectures. For example:
*init_sequence_f_r
*board_init_f_rEven though
board_init_f_mem()has nothing to do with any particular architecture it won't work (at least in current implementation) for X86.This is because on X86 "gd" is an alias to function
get_fs_gd_ptr(), thus we cannot assign anything to it.So this change separates selection of
board_init_f_mem()from X86 while keeping it disabled for X86 still.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Alexey Brodkin <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>If there're no objections on this one could it be applied?
This patch is a pre-requisite for ARC-update series, in particular for this patch - http://patchwork.ozlabs.org/patch/450963/
Feel free to pick it up via the ARC tree too.
- Simon
Quoted 11 lines · Alexey Brodkin
Purpose of this change is to make it possible to re-use code currently used on X86 solely for other architectures. For example:
*init_sequence_f_r
*board_init_f_rEven though
board_init_f_mem()has nothing to do with any particular architecture it won't work (at least in current implementation) for X86.This is because on X86 "gd" is an alias to function
get_fs_gd_ptr(), thus we cannot assign anything to it.
Quoted 6 lines
So this change separates selection of
board_init_f_mem()from X86 while keeping it disabled for X86 still.Signed-off-by Alexey Brodkin <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[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: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150328/13e7c17d/attachment.sig>