[Cbe-oss-dev] [PATCH 1/2] [POWERPC] spufs: don't (ab)use SCHED_IDLE
Christoph Hellwig
hch at lst.de
Tue Mar 11 18:08:19 EST 2008
On Tue, Mar 11, 2008 at 05:16:59PM +1100, Jeremy Kerr wrote:
> 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 at ozlabs.org>
>
> ---
> arch/powerpc/platforms/cell/spufs/run.c | 3 ++-
> arch/powerpc/platforms/cell/spufs/sched.c | 4 ++--
> arch/powerpc/platforms/cell/spufs/spufs.h | 1 +
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
> index 6221968..cac69e1 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;
Do we want to set the flag this late? If we do it a little earlier
it could replace the run_mutex similar to a patch Luke sent a while
ago.
More information about the cbe-oss-dev
mailing list