From: Andre Detsch Date: Mon, 30 Jul 2007 23:48:11 +0000 (+1000) Subject: [POWERPC] spufs: Fix affinity after introduction of node_allowed() calls X-Git-Tag: v2.6.23-rc2~1^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=683e3ab2b54a7190ec8517705880171cc8ac1d92;p=linux-2.6 [POWERPC] spufs: Fix affinity after introduction of node_allowed() calls This patch fixes affinity reference point placement, which was not being done in some situations, after the introduction of node_allowed() calls. The previously used parameter, 'ctx', is just the iterator of the previous list_for_each_entry_reverse loop, and its value might be invalid at the end of the loop. Also, the right context to seek for information when defining the reference ctx location _is_ the reference ctx. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 758a80ac08..c784edd40e 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -351,7 +351,8 @@ static void aff_set_ref_point_location(struct spu_gang *gang) lowest_offset = ctx->aff_offset; } - gang->aff_ref_spu = aff_ref_location(ctx, mem_aff, gs, lowest_offset); + gang->aff_ref_spu = aff_ref_location(gang->aff_ref_ctx, mem_aff, gs, + lowest_offset); } static struct spu *ctx_location(struct spu *ref, int offset, int node)