diff options
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-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. */ |