All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86
@ 2015-03-24  8:12 Alexey Brodkin
  2015-03-27  7:07 ` Alexey Brodkin
  2015-03-28 18:10 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Alexey Brodkin @ 2015-03-24  8:12 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 common/board_f.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 55ede07..e537cd1 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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 */
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86
  2015-03-24  8:12 [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86 Alexey Brodkin
@ 2015-03-27  7:07 ` Alexey Brodkin
  2015-03-28 15:14   ` Simon Glass
  2015-03-28 18:10 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Alexey Brodkin @ 2015-03-27  7:07 UTC (permalink / raw)
  To: u-boot

Hi Simon, Tom,

On Tue, 2015-03-24 at 11:12 +0300, Alexey Brodkin wrote:
> 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.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86
  2015-03-27  7:07 ` Alexey Brodkin
@ 2015-03-28 15:14   ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2015-03-28 15:14 UTC (permalink / raw)
  To: u-boot

On 27 March 2015 at 01:07, Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
> Hi Simon, Tom,
>
> On Tue, 2015-03-24 at 11:12 +0300, Alexey Brodkin wrote:
>> 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.
>>
>> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Tom Rini <trini@konsulko.com>
>
> 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/

Acked-by: Simon Glass <sjg@chromium.org>

Feel free to pick it up via the ARC tree too.

- Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] common/board_f: move board_init_f_mem() from #else CONFIG_X86
  2015-03-24  8:12 [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86 Alexey Brodkin
  2015-03-27  7:07 ` Alexey Brodkin
@ 2015-03-28 18:10 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2015-03-28 18:10 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 24, 2015 at 11:12:47AM +0300, Alexey Brodkin wrote:

> 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.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-28 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  8:12 [U-Boot] [PATCH] common/board_f: move board_init_f_mem() from #else CONFIG_X86 Alexey Brodkin
2015-03-27  7:07 ` Alexey Brodkin
2015-03-28 15:14   ` Simon Glass
2015-03-28 18:10 ` [U-Boot] " Tom Rini

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.