From: Christoph Hellwig Date: Mon, 23 Apr 2007 19:08:14 +0000 (+0200) Subject: [POWERPC] spu_base: move spu_init_channels out of spu_mutex X-Git-Tag: v2.6.22-rc1~1109^2~72^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=62c05d583ec016c40011462d5f03b072bfbd3dc7;p=linux-2.6-omap-h63xx.git [POWERPC] spu_base: move spu_init_channels out of spu_mutex 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 Signed-off-by: Arnd Bergmann --- diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index eba7a2641dc..6242f3c19f6 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c @@ -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);