[PATCH 5/8] Fix apparent code overlap in ppc64 head.S

David Gibson david at gibson.dropbear.id.au
Mon Aug 1 15:53:52 EST 2005


An #if/#else construct near the top of ppc64's head.S appears to
create overlapping sections of code for iSeries and pSeries (i.e. one
thing on iSeries and something different in the same place on
pSeries).  In fact, checking the various absolute offsets, it doesn't.
This patch unravels the #ifdefs to make it more obvious what's going
on.  This accomplishes another microstep towards a single kernel image
which can boot both iSeries and pSeries.

Signed-off-by: David Gibson <dwg at au1.ibm.com>

 arch/ppc64/kernel/head.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: working-2.6/arch/ppc64/kernel/head.S
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/head.S	2005-07-28 14:23:18.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/head.S	2005-07-28 14:23:20.000000000 +1000
@@ -92,6 +92,7 @@
 
 	/* Catch branch to 0 in real mode */
 	trap
+
 #ifdef CONFIG_PPC_ISERIES
 	/*
 	 * At offset 0x20, there is a pointer to iSeries LPAR data.
@@ -118,7 +119,7 @@
 embedded_sysmap_end:
 	.llong	0
 
-#else /* CONFIG_PPC_ISERIES */
+#endif /* CONFIG_PPC_ISERIES */
 
 	/* Secondary processors spin on this value until it goes to 1. */
 	.globl  __secondary_hold_spinloop
@@ -168,7 +169,6 @@
 	BUG_OPCODE
 #endif
 #endif
-#endif
 
 /* This value is used to mark exception frames on the stack. */
 	.section ".toc","aw"



More information about the Linuxppc64-dev mailing list