aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-06-04 21:25:59 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-06 21:44:40 -0400
commite5c0b9ec538a86433ddd725f675e0a5a2117b9ed (patch)
treeb1f8fba730e91daa42ff6910d7fdf2669115537d /arch/powerpc
parentd30ac1242bf842fe28501a78a460a43910ef2dba (diff)
[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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c8
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)
430 */ 430 */
431void spu_yield(struct spu_context *ctx) 431void spu_yield(struct spu_context *ctx)
432{ 432{
433 mutex_lock(&ctx->state_mutex); 433 if (!(ctx->flags & SPU_CREATE_NOSCHED)) {
434 __spu_deactivate(ctx, 0, MAX_PRIO); 434 mutex_lock(&ctx->state_mutex);
435 mutex_unlock(&ctx->state_mutex); 435 __spu_deactivate(ctx, 0, MAX_PRIO);
436 mutex_unlock(&ctx->state_mutex);
437 }
436} 438}
437 439
438void spu_sched_tick(struct work_struct *work) 440void spu_sched_tick(struct work_struct *work)