diff options
author | Christoph Hellwig <hch@lst.de> | 2007-06-05 03:25:59 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-07 03:44:40 +0200 |
commit | e5c0b9ec538a86433ddd725f675e0a5a2117b9ed (patch) | |
tree | b1f8fba730e91daa42ff6910d7fdf2669115537d | |
parent | [POWERPC] Fix typo in booting-without-of-txt section numbering (diff) | |
download | linux-e5c0b9ec538a86433ddd725f675e0a5a2117b9ed.tar.xz linux-e5c0b9ec538a86433ddd725f675e0a5a2117b9ed.zip |
[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 <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 68fcdc4515ab..3b831e07f1ed 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) |