From: Christoph Hellwig Date: Tue, 13 Feb 2007 20:36:47 +0000 (+0100) Subject: [POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignments X-Git-Tag: v2.6.21-rc1~273^2~3^2~6^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa56c16807ba7b8e801216cab012d2f498755ba5;p=linux-2.6 [POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignments unbind_context already sets the context state to SPU_STATE_SAVED, thus the spu_deactivate callers don't need to do it again. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 28c718ca3b..dd89aa7c1f 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -197,10 +197,8 @@ void spu_acquire_saved(struct spu_context *ctx) up_read(&ctx->state_sema); down_write(&ctx->state_sema); - if (ctx->state == SPU_STATE_RUNNABLE) { + if (ctx->state == SPU_STATE_RUNNABLE) spu_deactivate(ctx); - ctx->state = SPU_STATE_SAVED; - } downgrade_write(&ctx->state_sema); } diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index bd6fe4b7a8..6599cba968 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -315,7 +315,6 @@ void spu_yield(struct spu_context *ctx) pr_debug("%s: yielding SPU %d NODE %d\n", __FUNCTION__, spu->number, spu->node); spu_deactivate(ctx); - ctx->state = SPU_STATE_SAVED; need_yield = 1; } else { spu->prio = MAX_PRIO;