summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-12-10 20:16:07 +0000
committerPaul Mackerras <paulus@samba.org>2008-12-21 14:21:14 +1100
commitb2ea25b958968c152c6fac0594f2c9aa8b59eb8d (patch)
treeacf73d999342933369b2a96de9c79e002dee471d /arch
parente523f723d69cde44e10116d7f49b277da0c6702c (diff)
downloadop-kernel-dev-b2ea25b958968c152c6fac0594f2c9aa8b59eb8d.zip
op-kernel-dev-b2ea25b958968c152c6fac0594f2c9aa8b59eb8d.tar.gz
powerpc: Convert cpu_to_l2cache() to of_find_next_cache_node()
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/smp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index ffcb177..8ac3f72 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -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. */
OpenPOWER on IntegriCloud