linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix 32-bit SMP boot on CHRP
@ 2008-10-14  4:38 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2008-10-14  4:38 UTC (permalink / raw)
  To: linuxppc-dev

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

 arch/powerpc/kernel/head_32.S |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux-work.orig/arch/powerpc/kernel/head_32.S	2008-10-14 15:22:33.000000000 +1100
+++ linux-work/arch/powerpc/kernel/head_32.S	2008-10-14 15:23:58.000000000 +1100
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-14  4:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-14  4:38 [PATCH] powerpc: Fix 32-bit SMP boot on CHRP Benjamin Herrenschmidt

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