diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 897c74061168..67595bc380dc 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -728,7 +728,8 @@ static void spu_schedule(struct spu *spu, struct spu_context *ctx) | |||
728 | /* not a candidate for interruptible because it's called either | 728 | /* not a candidate for interruptible because it's called either |
729 | from the scheduler thread or from spu_deactivate */ | 729 | from the scheduler thread or from spu_deactivate */ |
730 | mutex_lock(&ctx->state_mutex); | 730 | mutex_lock(&ctx->state_mutex); |
731 | __spu_schedule(spu, ctx); | 731 | if (ctx->state == SPU_STATE_SAVED) |
732 | __spu_schedule(spu, ctx); | ||
732 | spu_release(ctx); | 733 | spu_release(ctx); |
733 | } | 734 | } |
734 | 735 | ||