From 637b18e9a8c9e119a8334547f52b76e8678a8177 Mon Sep 17 00:00:00 2001 From: Andre Detsch Date: Wed, 5 Dec 2007 13:49:31 +1100 Subject: [PATCH] --- yaml --- r: 81079 b: refs/heads/master c: a0a7ae8939e3fdecf5478ddba54562e23de7ca1d h: refs/heads/master i: 81077: 3c7c6dbe1d809b4d9dc4bed78689aa479a7a0d62 81075: d78f6ef21102ca5b826bd5e4ca81a157e8d192e8 81071: acd6dde87ba18c62ffc06fa0f4db712fdf872148 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/platforms/cell/spu_manage.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 52a1bf366c13..da3fc8bcef61 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3ce2f62b05eca594356fc477229e233e2678b509 +refs/heads/master: a0a7ae8939e3fdecf5478ddba54562e23de7ca1d diff --git a/trunk/arch/powerpc/platforms/cell/spu_manage.c b/trunk/arch/powerpc/platforms/cell/spu_manage.c index b36ed62a39cc..9979197ff409 100644 --- a/trunk/arch/powerpc/platforms/cell/spu_manage.c +++ b/trunk/arch/powerpc/platforms/cell/spu_manage.c @@ -411,10 +411,15 @@ static void init_affinity_qs20_harcoded(void) static int of_has_vicinity(void) { - struct spu* spu; + struct device_node *dn; - spu = list_first_entry(&cbe_spu_info[0].spus, struct spu, cbe_list); - return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL; + for_each_node_by_type(dn, "spe") { + if (of_find_property(dn, "vicinity", NULL)) { + of_node_put(dn); + return 1; + } + } + return 0; } static struct spu *devnode_spu(int cbe, struct device_node *dn)