[Cbe-oss-dev] [PATCH] Ignore memory listed in PS3 device tree

David Woodhouse dwmw2 at infradead.org
Fri Mar 30 08:43:57 EST 2007


The old 2.6.16 kernel handled memory statically and it was shown in the
device tree. The current kernel deals with the hypervisor and hotplugs
the memory, so we should just ignore anything that's reported in the
device-tree. This enables the current kernel to be booted from 2.6.16
without evil hacks in head_64.S to override the device-tree.

Signed-off-by: David Woodhouse <dwmw2 at infradead.org>

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 08bd255..dd38408 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,6 +52,7 @@
 #include <asm/pSeries_reconfig.h>
 #include <asm/pci-bridge.h>
 #include <asm/kexec.h>
+#include <asm/firmware.h>
 
 #ifdef DEBUG
 #define DBG(fmt...) printk(KERN_ERR fmt)
@@ -862,6 +863,9 @@ static int __init early_init_dt_scan_memory(unsigned long node,
 	cell_t *reg, *endp;
 	unsigned long l;
 
+	if (firmware_has_feature(FW_FEATURE_PS3_LV1))
+		return 0;
+
 	/* Look for the ibm,dynamic-reconfiguration-memory node */
 	if (depth == 1 &&
 	    strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0)

-- 
dwmw2




More information about the cbe-oss-dev mailing list