aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_32.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-13 18:38:48 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-15 10:13:29 +1100
commit2bda347bc53fe2cacd5621d8a0426840a8d2a6a6 (patch)
tree8000b78bf3a648115c916eb75cae12cd2eda415f /arch/powerpc/kernel/head_32.S
parentpowerpc: Fix link errors on 32-bit machines using legacy DMA (diff)
downloadlinux-dev-2bda347bc53fe2cacd5621d8a0426840a8d2a6a6.tar.xz
linux-dev-2bda347bc53fe2cacd5621d8a0426840a8d2a6a6.zip
powerpc: Fix 32-bit SMP boot on CHRP
prom_init was changed to take a new argument, the address where the kernel is loaded, which is now used to copy the SMP spin loop down before use. However, only head_64.S was adapted to pass this new value, not head_32.S, thus breaking SMP boot on 32-bit SMP CHRP machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/head_32.S')
-rw-r--r--arch/powerpc/kernel/head_32.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index a6de6dbc5ed8..0c326823c6d4 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -110,6 +110,12 @@ __start:
#ifdef CONFIG_PPC_MULTIPLATFORM
cmpwi 0,r5,0
beq 1f
+
+ /* find out where we are now */
+ bcl 20,31,$+4
+0: mflr r8 /* r8 = runtime addr here */
+ addis r8,r8,(_stext - 0b)@ha
+ addi r8,r8,(_stext - 0b)@l /* current runtime base addr */
bl prom_init
trap
#endif