diff options
author | Christoph Hellwig <hch@lst.de> | 2007-06-29 10:57:57 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-03 15:24:45 +1000 |
commit | 46cbf93960e64f313f6e247cbca7afaa50e3ee2c (patch) | |
tree | 00266a8ca2cdb95b9a62d3b60e6882bcfef2a1f7 /arch/powerpc/platforms | |
parent | ea1ae5949d7fcd2e622226ba71741a0f43b6ef0a (diff) |
[POWERPC] spusched: Catch nosched contexts in spu_deactivate
spu_deactivate should never be called for nosched contets. Put in
a check so we can print a stacktrace and exit early in case it
happes erroneously.
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')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 69272620a6b..a20e4e28858 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -491,6 +491,15 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio) */ void spu_deactivate(struct spu_context *ctx) { + /* + * We must never reach this for a nosched context, + * but handle the case gracefull instead of panicing. + */ + if (ctx->flags & SPU_CREATE_NOSCHED) { + WARN_ON(1); + return; + } + __spu_deactivate(ctx, 1, MAX_PRIO); } |