diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index dd89aa7c1f1641e5f0e7737f20dff8ac665509e6..ccffc449763b215db323fa3bfc384bff1eb1be55 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -139,7 +139,6 @@ int spu_acquire_exclusive(struct spu_context *ctx) ret = spu_activate(ctx, 0); if (ret) goto out; - ctx->state = SPU_STATE_RUNNABLE; } else { /* We need to exclude userspace access to the context. */ spu_unmap_mappings(ctx); @@ -173,7 +172,6 @@ int spu_acquire_runnable(struct spu_context *ctx) ret = spu_activate(ctx, 0); if (ret) goto out; - ctx->state = SPU_STATE_RUNNABLE; } downgrade_write(&ctx->state_sema); diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 6599cba9689b26174e65029a694968f7d478092e..7e9657eb690c4461011d72c13faa6e03923627b0 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -118,6 +118,8 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx) spu->timestamp = jiffies; spu_cpu_affinity_set(spu, raw_smp_processor_id()); spu_switch_notify(spu, ctx); + + ctx->state = SPU_STATE_RUNNABLE; } static inline void unbind_context(struct spu *spu, struct spu_context *ctx)