Skip to content

Commit

Permalink
[POWERPC] spusched: Catch nosched contexts in spu_deactivate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Paul Mackerras committed Jul 3, 2007
1 parent ea1ae59 commit 46cbf93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 46cbf93

Please sign in to comment.