提交 46cbf939 编写于 作者: C Christoph Hellwig 提交者: Paul Mackerras

[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: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 ea1ae594
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册