[Cbe-oss-dev] [PATCH] fix cbe_reg.c for "old" SLOF tree.
Jean-Christophe Dubois
jcd at tribudubois.net
Fri Jun 22 00:41:06 EST 2007
Some SLOF device trees have a "be" node but no "cpus" properties under it.
So le'ts fix the crash until the device tree is fixed.
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,6 +174,9 @@ static struct device_node *cbe_get_be_no
cpu_handle = of_get_property(np, "cpus", &len);
+ if (!cpu_handle)
+ continue;
+
for (i=0; i<len; i++)
if (of_find_node_by_phandle(cpu_handle[i]) == of_get_cpu_node(cpu_id, NULL))
return np;
More information about the cbe-oss-dev
mailing list