[POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignments
authorChristoph Hellwig <hch@lst.de>
Tue, 13 Feb 2007 20:36:47 +0000 (21:36 +0100)
committerArnd Bergmann <arnd@klappe.arndb.de>
Tue, 13 Feb 2007 20:52:36 +0000 (21:52 +0100)
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>
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/sched.c

index 28c718ca3b513b3bcdaccca1435ee459b79537d5..dd89aa7c1f1641e5f0e7737f20dff8ac665509e6 100644 (file)
@@ -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);
 }
index bd6fe4b7a84baab84face56b2d8ca5f5c263db2e..6599cba9689b26174e65029a694968f7d478092e 100644 (file)
@@ -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;