Skip to content

Commit

Permalink
[POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Arnd Bergmann committed Feb 13, 2007
1 parent 5cb23af commit aa56c16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/platforms/cell/spufs/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 0 additions & 1 deletion arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa56c16

Please sign in to comment.