[Cbe-oss-dev] [PATCH] allow linux to map Cell regs on "old" SLOF tree.

Jean-Christophe Dubois jcd at tribudubois.net
Fri Jun 22 01:16:25 EST 2007


The platforms missing the "cpus" property in the "be" node are mono-Cell platforms such as CAB or Getaway.

Therefore it is possible to assume that if there is no "cpus" properties under the "be" node then we can safely
return the "device node" without more checking. This is a bit hacky but ...

Signed-off-by: Jean-Christophe DUBOIS <jcd at tribudubois.net>

Index: linux-2.6.22-rc4/arch/powerpc/platforms/cell/cbe_regs.c
===================================================================
--- linux-2.6.22-rc4.orig/arch/powerpc/platforms/cell/cbe_regs.c
+++ linux-2.6.22-rc4/arch/powerpc/platforms/cell/cbe_regs.c
@@ -174,8 +174,9 @@ static struct device_node *cbe_get_be_no
 
 		cpu_handle = of_get_property(np, "cpus", &len);
 
+		/* the CAB SLOF tree is non compliant, so we just assume there is only one node */
 		if (!cpu_handle)
-			continue;
+			return np;
 
 		for (i=0; i<len; i++)
 			if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))



More information about the cbe-oss-dev mailing list