[PATCH] Use PLATFORM_LPAR rather than PLATFORM_PSERIES_LPAR

Jimi Xenidis jimix at watson.ibm.com
Sat Sep 10 08:16:59 EST 2005


Since processor.h defines a PLATFORM_LPAR bit, it would be better to
use the bit rather than the pSeries value to detect generic LPAR.
This patch allows for a both furure PLATFORM_[MAPLE|CELL]_LPAR
platforms to share PSERIES_LPAR code.

Signed-off-by: Jimi Xenidis <jimix at watson.ibm.com>


diff -r b8c644fc851a arch/ppc64/kernel/prom.c
--- a/arch/ppc64/kernel/prom.c	Fri Sep  9 17:45:35 2005
+++ b/arch/ppc64/kernel/prom.c	Fri Sep  9 18:08:38 2005
@@ -1004,7 +1004,7 @@
 
 	/* On LPAR, look for the first ibm,pft-size property for the  hash table size
 	 */
-	if (systemcfg->platform == PLATFORM_PSERIES_LPAR && ppc64_pft_size == 0) {
+	if ((systemcfg->platform & PLATFORM_LPAR) && ppc64_pft_size == 0) {
 		u32 *pft_size;
 		pft_size = (u32 *)get_flat_dt_prop(node, "ibm,pft-size", NULL);
 		if (pft_size != NULL) {
diff -r b8c644fc851a arch/ppc64/kernel/prom_init.c
--- a/arch/ppc64/kernel/prom_init.c	Fri Sep  9 17:45:35 2005
+++ b/arch/ppc64/kernel/prom_init.c	Fri Sep  9 18:08:38 2005
@@ -888,7 +888,7 @@
 	 * Setup our top alloc point, that is top of RMO or top of
 	 * segment 0 when running non-LPAR.
 	 */
-	if ( RELOC(of_platform) == PLATFORM_PSERIES_LPAR )
+	if ( RELOC(of_platform) & PLATFORM_LPAR )
 		RELOC(alloc_top) = RELOC(rmo_top);
 	else
 		/* Some RS64 machines have buggy firmware where claims up at 1GB
diff -r b8c644fc851a arch/ppc64/kernel/rtas.c
--- a/arch/ppc64/kernel/rtas.c	Fri Sep  9 17:45:35 2005
+++ b/arch/ppc64/kernel/rtas.c	Fri Sep  9 18:08:38 2005
@@ -747,7 +747,7 @@
 	 */
 	if (rtas.dev) {
 		unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
-		if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
+		if (systemcfg->platform & PLATFORM_LPAR)
 			rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
 
 		rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE,
diff -r b8c644fc851a arch/ppc64/kernel/xics.c
--- a/arch/ppc64/kernel/xics.c	Fri Sep  9 17:45:35 2005
+++ b/arch/ppc64/kernel/xics.c	Fri Sep  9 18:08:38 2005
@@ -561,7 +561,7 @@
 #else
 		xics_per_cpu[0] = ioremap(intr_base, intr_size);
 #endif /* CONFIG_SMP */
-	} else if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
+	} else if (systemcfg->platform & PLATFORM_LPAR) {
 		ops = &pSeriesLP_ops;
 	}
 



More information about the Linuxppc64-dev mailing list