summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
context:
space:
mode:
authorChristoph Hellwig2007-06-29 02:57:58 +0200
committerPaul Mackerras2007-07-03 07:24:45 +0200
commitdf09cf3e2cd597d373f3a6046df0e0a50881ea44 (patch)
tree40b30ef28a0ec1b7cc8ab153cea17dee601588b1 /arch/powerpc/platforms/cell/spufs/sched.c
parent[POWERPC] spusched: Catch nosched contexts in spu_deactivate (diff)
downloadkernel-qcow2-linux-df09cf3e2cd597d373f3a6046df0e0a50881ea44.tar.gz
kernel-qcow2-linux-df09cf3e2cd597d373f3a6046df0e0a50881ea44.tar.xz
kernel-qcow2-linux-df09cf3e2cd597d373f3a6046df0e0a50881ea44.zip
[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>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index a20e4e28858c..7bb5229b1e3c 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/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;
/*