From: Nathan Lynch Date: Fri, 25 Jul 2008 22:50:30 +0000 (-0500) Subject: powerpc: Fix boot problem due to AT_BASE_PLATFORM change X-Git-Tag: v2.6.27-rc1~213^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc532f810832beb3306b42526a78f411972281c7;p=linux-2.6 powerpc: Fix boot problem due to AT_BASE_PLATFORM change 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 Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 25a052c167..25c273c761 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