]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Convert cpu_to_l2cache() to of_find_next_cache_node()
authorNathan Lynch <ntl@pobox.com>
Wed, 10 Dec 2008 20:16:07 +0000 (20:16 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 21 Dec 2008 03:21:14 +0000 (14:21 +1100)
The smp code uses cache information to populate cpu_core_map; change
it to use common code for cache lookup.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/smp.c

index ffcb1779a220ce26fba5277beff323e80ada5e37..8ac3f721d2359e20b09476fbe85aafc7c161f97d 100644 (file)
@@ -466,8 +466,7 @@ out:
 static struct device_node *cpu_to_l2cache(int cpu)
 {
        struct device_node *np;
-       const phandle *php;
-       phandle ph;
+       struct device_node *cache;
 
        if (!cpu_present(cpu))
                return NULL;
@@ -476,13 +475,11 @@ static struct device_node *cpu_to_l2cache(int cpu)
        if (np == NULL)
                return NULL;
 
-       php = of_get_property(np, "l2-cache", NULL);
-       if (php == NULL)
-               return NULL;
-       ph = *php;
+       cache = of_find_next_cache_node(np);
+
        of_node_put(np);
 
-       return of_find_node_by_phandle(ph);
+       return cache;
 }
 
 /* Activate a secondary processor. */