[PATCH 4/10] ppc64: Make stab_initialize() work on iSeries

Michael Ellerman michael at ellerman.id.au
Wed Aug 10 14:18:36 EST 2005


We don't need to call stab_initialize() for the boot cpu on iSeries, so
we hack around it so that early_setup() can be called on iSeries.

Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---

 arch/ppc64/kernel/setup.c |    4 ++--
 arch/ppc64/mm/stab.c      |   10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

Index: work/arch/ppc64/mm/stab.c
===================================================================
--- work.orig/arch/ppc64/mm/stab.c
+++ work/arch/ppc64/mm/stab.c
@@ -20,6 +20,7 @@
 #include <asm/cputable.h>
 #include <asm/lmb.h>
 #include <asm/abs_addr.h>
+#include <asm/firmware.h>
 
 struct stab_entry {
 	unsigned long esid_data;
@@ -277,3 +278,12 @@ void stab_initialize(unsigned long stab)
 		asm volatile("sync":::"memory");
 	}
 }
+
+void stab_initialize_boot(unsigned long stab)
+{
+	/* stab is initialized by the HV for the boot cpu on iSeries */
+	if (firmware_has_feature(FW_FEATURE_ISERIES))
+		return;
+
+	stab_initialize(stab);
+}
Index: work/arch/ppc64/kernel/setup.c
===================================================================
--- work.orig/arch/ppc64/kernel/setup.c
+++ work/arch/ppc64/kernel/setup.c
@@ -96,7 +96,7 @@ extern void udbg_init_maple_realmode(voi
 extern unsigned long klimit;
 
 extern void mm_init_ppc64(void);
-extern void stab_initialize(unsigned long stab);
+extern void stab_initialize_boot(unsigned long stab);
 extern void htab_initialize(void);
 extern void early_init_devtree(void *flat_dt);
 extern void unflatten_device_tree(void);
@@ -436,7 +436,7 @@ void __init early_setup(unsigned long dt
 	/*
 	 * Initialize stab / SLB management
 	 */
-	stab_initialize(lpaca->stab_real);
+	stab_initialize_boot(lpaca->stab_real);
 
 	/*
 	 * Initialize the MMU Hash table and create the linear mapping



More information about the Linuxppc64-dev mailing list