diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-03-04 20:17:02 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-03-11 12:28:02 +1100 |
commit | ce7c191bca88aa2f942f70a6d6c6315739a81a32 (patch) | |
tree | 9acd862b1278fb4cc38f52ae11715e050e505621 /arch/powerpc/platforms/cell/spufs/run.c | |
parent | 3cecdda3f169f22f324f78fd544beee68e3cc6a4 (diff) | |
download | linux-ce7c191bca88aa2f942f70a6d6c6315739a81a32.tar.gz linux-ce7c191bca88aa2f942f70a6d6c6315739a81a32.tar.bz2 linux-ce7c191bca88aa2f942f70a6d6c6315739a81a32.zip |
[POWERPC] spufs: don't (ab)use SCHED_IDLE
commit 4ef11014 introduced a usage of SCHED_IDLE to detect when
a context is within spu_run.
Instead of SCHED_IDLE (which has other meaning), add a flag to
sched_flags to tell if a context should be running.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/run.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 6221968c2a3c..cac69e116776 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c @@ -220,6 +220,7 @@ static int spu_run_init(struct spu_context *ctx, u32 *npc) } } + set_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags); return 0; } @@ -234,7 +235,7 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc, *npc = ctx->ops->npc_read(ctx); spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); - ctx->policy = SCHED_IDLE; + clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags); spu_release(ctx); if (signal_pending(current)) |