aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-02-13 15:36:47 -0500
committerArnd Bergmann <arnd@klappe.arndb.de>2007-02-13 15:52:36 -0500
commitaa56c16807ba7b8e801216cab012d2f498755ba5 (patch)
tree6674e69a8da14e70ddcf9333eb7c28e99402d86f /arch/powerpc
parent5cb23afc9e64841adb43d46160a5c63a80ebfd54 (diff)
[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 <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c1
2 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 28c718ca3b51..dd89aa7c1f16 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)
197 up_read(&ctx->state_sema); 197 up_read(&ctx->state_sema);
198 down_write(&ctx->state_sema); 198 down_write(&ctx->state_sema);
199 199
200 if (ctx->state == SPU_STATE_RUNNABLE) { 200 if (ctx->state == SPU_STATE_RUNNABLE)
201 spu_deactivate(ctx); 201 spu_deactivate(ctx);
202 ctx->state = SPU_STATE_SAVED;
203 }
204 202
205 downgrade_write(&ctx->state_sema); 203 downgrade_write(&ctx->state_sema);
206} 204}
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index bd6fe4b7a84b..6599cba9689b 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)
315 pr_debug("%s: yielding SPU %d NODE %d\n", 315 pr_debug("%s: yielding SPU %d NODE %d\n",
316 __FUNCTION__, spu->number, spu->node); 316 __FUNCTION__, spu->number, spu->node);
317 spu_deactivate(ctx); 317 spu_deactivate(ctx);
318 ctx->state = SPU_STATE_SAVED;
319 need_yield = 1; 318 need_yield = 1;
320 } else { 319 } else {
321 spu->prio = MAX_PRIO; 320 spu->prio = MAX_PRIO;