Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b86ce01c7700cfc74665799355a46dcadf920ebd
Commit:     b86ce01c7700cfc74665799355a46dcadf920ebd
Parent:     827e3648dc2c31e01db7cd2e4498061cf78a97a9
Author:     Jean-Christophe DUBOIS <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 21:39:25 2007 +0200
Committer:  Arnd Bergmann <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 21:41:41 2007 +0200

    [CELL] allow linux to map Cell regs on legacy SLOF tree.
    
    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 ... it allows it to work on
    these platforms.
    
    Signed-off-by: Jean-Christophe DUBOIS <[EMAIL PROTECTED]>
    Acked-by: Christian Krafft <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/cbe_regs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/cell/cbe_regs.c 
b/arch/powerpc/platforms/cell/cbe_regs.c
index 12c9674..c8f7f00 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -174,6 +174,13 @@ static struct device_node *cbe_get_be_node(int cpu_id)
 
                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 (WARN_ON_ONCE(!cpu_handle))
+                       return np;
+
                for (i=0; i<len; i++)
                        if (of_find_node_by_phandle(cpu_handle[i]) == 
of_get_cpu_node(cpu_id, NULL))
                                return np;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to