]> err.no Git - linux-2.6/commitdiff
[POWERPC] spu_base: move spu_init_channels out of spu_mutex
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Apr 2007 19:08:14 +0000 (21:08 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Mon, 23 Apr 2007 19:18:55 +0000 (21:18 +0200)
There is no reason to execute spu_init_channels under spu_mutex
after the spu has been taken off the freelist it's ours.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spu_base.c

index eba7a2641dcedf0c345e4c6dc7692f9c9deb48c9..6242f3c19f68f0562fa6ccd9f0fc704738bd4b2c 100644 (file)
@@ -431,10 +431,11 @@ struct spu *spu_alloc_node(int node)
                spu = list_entry(spu_list[node].next, struct spu, list);
                list_del_init(&spu->list);
                pr_debug("Got SPU %d %d\n", spu->number, spu->node);
-               spu_init_channels(spu);
        }
        mutex_unlock(&spu_mutex);
 
+       if (spu)
+               spu_init_channels(spu);
        return spu;
 }
 EXPORT_SYMBOL_GPL(spu_alloc_node);