From: Christoph Hellwig Date: Tue, 5 Jun 2007 01:25:59 +0000 (+1000) Subject: [POWERPC] spufs: Don't yield nosched context X-Git-Tag: v2.6.22-rc5~102^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=e5c0b9ec538a86433ddd725f675e0a5a2117b9ed;p=~shefty%2Frdma-dev.git [POWERPC] spufs: Don't yield nosched context Nosched context sould never be scheduled out, thus we must not deactivate them in spu_yield ever. Signed-off-by: Christoph Hellwig Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 68fcdc4515a..3b831e07f1e 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -430,9 +430,11 @@ void spu_deactivate(struct spu_context *ctx) */ void spu_yield(struct spu_context *ctx) { - mutex_lock(&ctx->state_mutex); - __spu_deactivate(ctx, 0, MAX_PRIO); - mutex_unlock(&ctx->state_mutex); + if (!(ctx->flags & SPU_CREATE_NOSCHED)) { + mutex_lock(&ctx->state_mutex); + __spu_deactivate(ctx, 0, MAX_PRIO); + mutex_unlock(&ctx->state_mutex); + } } void spu_sched_tick(struct work_struct *work)