Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46cbf939 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Paul Mackerras
Browse files

[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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent ea1ae594
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);
}