[Cbe-oss-dev] [PATCH 4/6] spufs: fix remote library call statistic

Luke Browning lukebr at linux.vnet.ibm.com
Thu Feb 7 04:43:37 EST 2008


Fix spu context statistic for remote library calls.  

Context doesn't have to be runnable.  It can be in the saved state.

Signed-off-by: Luke Browning <lukebrowning at us.ibm.com>

---

Index: spufs/arch/powerpc/platforms/cell/spufs/run.c
===================================================================
--- spufs.orig/arch/powerpc/platforms/cell/spufs/run.c	2008-02-06 12:50:46.000000000 -0200
+++ spufs/arch/powerpc/platforms/cell/spufs/run.c	2008-02-06 12:51:26.000000000 -0200
@@ -398,14 +398,13 @@
 				      SPU_STATUS_STOPPED_BY_HALT |
 				       SPU_STATUS_SINGLE_STEP)));
 
-	if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
-	    (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100) &&
-	    (ctx->state == SPU_STATE_RUNNABLE))
-		ctx->stats.libassist++;
-
 	spu_disable_spu(ctx);
 	ret = spu_run_fini(ctx, npc, &status);
 
+	if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
+	    (((status >> SPU_STOP_STATUS_SHIFT) & 0x3f00) == 0x2100))
+		ctx->stats.libassist++;
+
 	if ((ret == 0) ||
 	    ((ret == -ERESTARTSYS) &&
 	     ((status & SPU_STATUS_STOPPED_BY_HALT) ||





More information about the cbe-oss-dev mailing list