Browse Source

[POWERPC] spusched: No preemption for nosched contexts

And last but not least we need to make sure the scheduler tick never
preempts a nosched context.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christoph Hellwig 18 years ago
parent
commit
df09cf3e2c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      arch/powerpc/platforms/cell/spufs/sched.c

+ 6 - 1
arch/powerpc/platforms/cell/spufs/sched.c

@@ -522,7 +522,12 @@ void spu_yield(struct spu_context *ctx)
 
 static void spusched_tick(struct spu_context *ctx)
 {
-	if (ctx->policy == SCHED_FIFO || --ctx->time_slice)
+	if (ctx->flags & SPU_CREATE_NOSCHED)
+		return;
+	if (ctx->policy == SCHED_FIFO)
+		return;
+
+	if (--ctx->time_slice)
 		return;
 
 	/*