public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Revert "ARM: SPL: do not set gd again"
Date: Tue, 16 Sep 2014 20:27:23 -0400	[thread overview]
Message-ID: <1410913643-31238-1-git-send-email-trini@ti.com> (raw)

At the high level, the problem is that we set gd multiple times (and
still do, even after the commit we're reverting).  We set important
parts of gd to the copy which is not above stack but rather in the data
section.  For the release, we're going to revert this change and for the
next release we shall correct things to only, really, set gd once to an
appropriate location and ensure that comments about it are correct too.

This reverts commit f0c3a6c4ad09210d5d4aeafe87685ee75e5683d6.

Acked-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@ti.com>
---
 arch/arm/lib/spl.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 75ab546..dfcc596 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -28,6 +28,9 @@ void __weak board_init_f(ulong dummy)
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
+	/* Set global data pointer. */
+	gd = &gdata;
+
 	board_init_r(NULL, 0);
 }
 
-- 
1.7.9.5

             reply	other threads:[~2014-09-17  0:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  0:27 Tom Rini [this message]
2014-09-17  0:47 ` [U-Boot] [PATCH] Revert "ARM: SPL: do not set gd again" Tom Rini
2014-11-10 22:13   ` Simon Glass
2014-11-11 21:57     ` Tom Rini
2014-11-12  0:59       ` Simon Glass
2014-11-28 21:48       ` Jeroen Hofstee
2014-12-04 14:16         ` Tom Rini

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=1410913643-31238-1-git-send-email-trini@ti.com \
    --to=trini@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox