diff options
author | Nathan Lynch <ntl@pobox.com> | 2008-12-10 15:16:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-20 22:21:14 -0500 |
commit | b2ea25b958968c152c6fac0594f2c9aa8b59eb8d (patch) | |
tree | acf73d999342933369b2a96de9c79e002dee471d | |
parent | e523f723d69cde44e10116d7f49b277da0c6702c (diff) |
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>
-rw-r--r-- | arch/powerpc/kernel/smp.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index ffcb1779a220..8ac3f721d235 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -466,8 +466,7 @@ out: | |||
466 | static struct device_node *cpu_to_l2cache(int cpu) | 466 | static struct device_node *cpu_to_l2cache(int cpu) |
467 | { | 467 | { |
468 | struct device_node *np; | 468 | struct device_node *np; |
469 | const phandle *php; | 469 | struct device_node *cache; |
470 | phandle ph; | ||
471 | 470 | ||
472 | if (!cpu_present(cpu)) | 471 | if (!cpu_present(cpu)) |
473 | return NULL; | 472 | return NULL; |
@@ -476,13 +475,11 @@ static struct device_node *cpu_to_l2cache(int cpu) | |||
476 | if (np == NULL) | 475 | if (np == NULL) |
477 | return NULL; | 476 | return NULL; |
478 | 477 | ||
479 | php = of_get_property(np, "l2-cache", NULL); | 478 | cache = of_find_next_cache_node(np); |
480 | if (php == NULL) | 479 | |
481 | return NULL; | ||
482 | ph = *php; | ||
483 | of_node_put(np); | 480 | of_node_put(np); |
484 | 481 | ||
485 | return of_find_node_by_phandle(ph); | 482 | return cache; |
486 | } | 483 | } |
487 | 484 | ||
488 | /* Activate a secondary processor. */ | 485 | /* Activate a secondary processor. */ |