[Cbe-oss-dev] [PATCH 3/10] spu sched: remove superflous SPU_STATE_SAVED assignments
Christoph Hellwig
hch at lst.de
Mon Jan 8 09:14:54 EST 2007
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 at lst.de>
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/context.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/context.c 2006-12-17 21:12:57.000000000 +0100
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/context.c 2006-12-17 21:13:12.000000000 +0100
@@ -193,10 +193,8 @@
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: linux-2.6/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/sched.c 2006-12-17 21:12:45.000000000 +0100
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/sched.c 2006-12-17 21:12:52.000000000 +0100
@@ -315,7 +315,6 @@
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;
More information about the cbe-oss-dev
mailing list