linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl@pobox.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: ppc-dev <Linuxppc-dev@ozlabs.org>
Subject: Re: can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector
Date: Fri, 25 Jul 2008 17:50:30 -0500	[thread overview]
Message-ID: <20080725225030.GJ9594@localdomain> (raw)
In-Reply-To: <1217024108.11188.117.camel@pasglop>

Commit 9115d13453dee22473a1e8cacc90a8d64a9c4bc9 ("powerpc: Enable
AT_BASE_PLATFORM aux vector") broke boot on 32-bit powerpc systems; we
have to use PTRRELOC to initialize powerpc_base_platform this early in
boot.

Bug reported by Jon Smirl.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
Benjamin Herrenschmidt wrote:
> if (RELOC(powerpc_base_platform))
> 	RELOC(powerpc_base_platform) = t->platform;
> 
> try that.

Maybe this?  (RELOC isn't defined in any header AFAICT).

 arch/powerpc/kernel/cputable.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 25a052c..25c273c 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1660,8 +1660,8 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
 			 * Set the base platform string once; assumes
 			 * we're called with real pvr first.
 			 */
-			if (powerpc_base_platform == NULL)
-				powerpc_base_platform = t->platform;
+			if (*PTRRELOC(&powerpc_base_platform) == NULL)
+				*PTRRELOC(&powerpc_base_platform) = t->platform;
 
 #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
 			/* ppc64 and booke expect identify_cpu to also call
-- 
1.5.6.2

  parent reply	other threads:[~2008-07-25 22:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 21:51 can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector Jon Smirl
2008-07-25 22:00 ` Nathan Lynch
2008-07-25 22:15   ` Benjamin Herrenschmidt
2008-07-25 22:46     ` Jon Smirl
2008-07-25 22:51       ` Jon Smirl
2008-07-25 22:50     ` Nathan Lynch [this message]
2008-07-25 22:52       ` Jon Smirl
2008-07-25 22:58         ` Nathan Lynch

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=20080725225030.GJ9594@localdomain \
    --to=ntl@pobox.com \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=benh@kernel.crashing.org \
    /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;
as well as URLs for NNTP newsgroup(s).