diff options
author | Luke Browning <lukebr@linux.vnet.ibm.com> | 2008-02-07 23:50:41 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-02-08 03:52:36 -0500 |
commit | e66686b414f10f1ef2cd0aa77a03a67e17304773 (patch) | |
tree | 709742939ca10409ae663d0824153b959076e680 /arch/powerpc | |
parent | 732377c5f5335e227171c76532613f45b4067f25 (diff) |
[POWERPC] spufs: No need to have a runnable SPU for libassist update
We don't need to update the libassist statistic with the context in a
runnable state, so do it after spu_disable_spu().
Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index e9c61a1a8f98..f401e51a7979 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -395,16 +395,14 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) | |||
395 | SPU_STATUS_STOPPED_BY_HALT | | 395 | SPU_STATUS_STOPPED_BY_HALT | |
396 | SPU_STATUS_SINGLE_STEP))); | 396 | SPU_STATUS_SINGLE_STEP))); |
397 | 397 | ||
398 | if ((status & SPU_STATUS_STOPPED_BY_STOP) && | ||
399 | (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100) && | ||
400 | (ctx->state == SPU_STATE_RUNNABLE)) | ||
401 | ctx->stats.libassist++; | ||
402 | |||
403 | |||
404 | spu_disable_spu(ctx); | 398 | spu_disable_spu(ctx); |
405 | ret = spu_run_fini(ctx, npc, &status); | 399 | ret = spu_run_fini(ctx, npc, &status); |
406 | spu_yield(ctx); | 400 | spu_yield(ctx); |
407 | 401 | ||
402 | if ((status & SPU_STATUS_STOPPED_BY_STOP) && | ||
403 | (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100)) | ||
404 | ctx->stats.libassist++; | ||
405 | |||
408 | if ((ret == 0) || | 406 | if ((ret == 0) || |
409 | ((ret == -ERESTARTSYS) && | 407 | ((ret == -ERESTARTSYS) && |
410 | ((status & SPU_STATUS_STOPPED_BY_HALT) || | 408 | ((status & SPU_STATUS_STOPPED_BY_HALT) || |