diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2008-08-13 11:29:31 +1000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2008-08-13 11:42:47 +1000 |
commit | d9dd421fd6ed17af55d27c8d93a9f561be0ff50f (patch) | |
tree | 00a4f49a7a9f478e97aebee786682c2723e3b533 /arch/powerpc/platforms | |
parent | 2e1e9212ed8c532c6b324de77d3cafef5d2bc846 (diff) | |
download | kernel_samsung_smdk4412-d9dd421fd6ed17af55d27c8d93a9f561be0ff50f.zip kernel_samsung_smdk4412-d9dd421fd6ed17af55d27c8d93a9f561be0ff50f.tar.gz kernel_samsung_smdk4412-d9dd421fd6ed17af55d27c8d93a9f561be0ff50f.tar.bz2 |
powerpc/spufs: fix npc setting for NOSCHED contexts
Currently, spu_run ignores the npc argument for contexts created with
SPU_CREATE_NOSCHED. While this is correct for isolated contexts,
there's no need to enforce the npc restriction on non-isolated NOSCHED
contexts.
This means that NOSCHED contexts can only ever run with an entry point
of 0x0.
This change to spu_run_init allows setting of the npc (and, while we're
at it, the privcntl) for non-isolated NOSCHED contexts. This allows
us to run NOSCHED contexts from any entry point.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index f7edba6..c9bb7cf 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c @@ -206,11 +206,6 @@ static int spu_run_init(struct spu_context *ctx, u32 *npc) (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE); if (runcntl == 0) runcntl = SPU_RUNCNTL_RUNNABLE; - } - - if (ctx->flags & SPU_CREATE_NOSCHED) { - spuctx_switch_state(ctx, SPU_UTIL_USER); - ctx->ops->runcntl_write(ctx, runcntl); } else { unsigned long privcntl; @@ -219,9 +214,15 @@ static int spu_run_init(struct spu_context *ctx, u32 *npc) else privcntl = SPU_PRIVCNTL_MODE_NORMAL; - ctx->ops->npc_write(ctx, *npc); ctx->ops->privcntl_write(ctx, privcntl); - ctx->ops->runcntl_write(ctx, runcntl); + ctx->ops->npc_write(ctx, *npc); + } + + ctx->ops->runcntl_write(ctx, runcntl); + + if (ctx->flags & SPU_CREATE_NOSCHED) { + spuctx_switch_state(ctx, SPU_UTIL_USER); + } else { if (ctx->state == SPU_STATE_SAVED) { ret = spu_activate(ctx, 0); |