[Cbe-oss-dev] [PATCH 15/18] powerpc/spufs: Fix position of BUG_ON inside spusched_tick
Andre Detsch
adetsch at br.ibm.com
Thu Dec 11 06:40:44 EST 2008
The old position of the BUG_ON(!spu_gang_runnable(gang))
command was leading to false bug notifications.
The gang might become not runnable when spusched_tick is
about to be called, as there is no lock being hold that
prevents this to happen. It only is a bug if ctx->spu
was not unset during the process.
Signed-off-by: Andre Detsch <adetsch at br.ibm.com>
---
arch/powerpc/platforms/cell/spufs/sched.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index be13b19..7b4852f 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1160,11 +1160,11 @@ static noinline int spusched_tick(struct spu_gang *gang,
mutex_lock(&gang->mutex);
- BUG_ON(!spu_gang_runnable(gang));
-
if (!ctx->spu)
goto out;
+ BUG_ON(!spu_gang_runnable(gang));
+
if (ctx->flags & SPU_CREATE_NOSCHED)
goto out;
--
1.5.4.3
More information about the cbe-oss-dev
mailing list