diff options
author | Christoph Hellwig <hch@lst.de> | 2007-06-28 20:57:57 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-03 01:24:45 -0400 |
commit | 46cbf93960e64f313f6e247cbca7afaa50e3ee2c (patch) | |
tree | 00266a8ca2cdb95b9a62d3b60e6882bcfef2a1f7 /arch | |
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')
-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 69272620a6b7..a20e4e28858c 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) | |||
491 | */ | 491 | */ |
492 | void spu_deactivate(struct spu_context *ctx) | 492 | void spu_deactivate(struct spu_context *ctx) |
493 | { | 493 | { |
494 | /* | ||
495 | * We must never reach this for a nosched context, | ||
496 | * but handle the case gracefull instead of panicing. | ||
497 | */ | ||
498 | if (ctx->flags & SPU_CREATE_NOSCHED) { | ||
499 | WARN_ON(1); | ||
500 | return; | ||
501 | } | ||
502 | |||
494 | __spu_deactivate(ctx, 1, MAX_PRIO); | 503 | __spu_deactivate(ctx, 1, MAX_PRIO); |
495 | } | 504 | } |
496 | 505 | ||