]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] spufs: fix rescheduling of non-runnable contexts
authorJeremy Kerr <jk@ozlabs.org>
Tue, 11 Mar 2008 01:46:18 +0000 (12:46 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 11 Mar 2008 01:46:18 +0000 (12:46 +1100)
commit3f8700ca7d8259d8200758f09a591c96cabff9f5
treed00ec74a057bbc9ab251c6a8c47787c757cc9340
parentda82402bc3eb0c3c72f3a0f6805769a0f2d6831a
[POWERPC] spufs: fix rescheduling of non-runnable contexts

At present, we can hit the BUG_ON in __spu_update_sched_info by reading
the regs file of a context between two calls to spu_run. The
spu_release_saved called by spufs_regs_read() is resulting in the (now
non-runnable) context being placed back on the run queue, so the next
call to spu_run ends up in the bug condition.

This change uses the SPU_SCHED_SPU_RUN flag to only reschedule a context
if it's still in spu_run().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/context.c