[Cbe-oss-dev] PATCH [6/7] fix signal delivery

Luke Browning lukebr at linux.vnet.ibm.com
Thu Nov 1 11:07:23 EST 2007


Fix signal delivery.  Need to ensure that the context is not queued, when
the controlling thread returns to user mode.

Signed-off-by: Luke Browning <lukebr at linux.vnet.ibm.com>

---

Index: linux-2.6.22/arch/powerpc/platforms/cell/spufs/run.c
===================================================================
--- linux-2.6.22.orig/arch/powerpc/platforms/cell/spufs/run.c
+++ linux-2.6.22/arch/powerpc/platforms/cell/spufs/run.c
@@ -224,6 +224,8 @@ static int spu_run_fini(struct spu_conte
 {
 	int ret = 0;
 
+	spu_del_from_rq(ctx);
+
 	spuctx_switch_state(ctx, SPUCTX_UTIL_SYSTEM);
 
 	*status = ctx->ops->status_read(ctx);
Index: linux-2.6.22/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linux-2.6.22.orig/arch/powerpc/platforms/cell/spufs/sched.c
+++ linux-2.6.22/arch/powerpc/platforms/cell/spufs/sched.c
@@ -508,6 +508,13 @@ static void __spu_del_from_rq(struct spu
 	}
 }
 
+void spu_del_from_rq(struct spu_context *ctx)
+{
+	spin_lock(&spu_prio->runq_lock);
+	__spu_del_from_rq(ctx);
+	spin_unlock(&spu_prio->runq_lock);
+}
+
 static void spu_prio_wait(struct spu_context *ctx)
 {
 	DEFINE_WAIT(wait);
Index: linux-2.6.22/arch/powerpc/platforms/cell/spufs/spufs.h
===================================================================
--- linux-2.6.22.orig/arch/powerpc/platforms/cell/spufs/spufs.h
+++ linux-2.6.22/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -261,6 +261,7 @@ int spu_acquire_runnable(struct spu_cont
 void spu_acquire_saved(struct spu_context *ctx);
 void spu_release_saved(struct spu_context *ctx);
 
+void spu_del_from_rq(struct spu_context *ctx);
 int spu_activate(struct spu_context *ctx, unsigned long flags);
 void spu_deactivate(struct spu_context *ctx);
 void spu_yield(struct spu_context *ctx);





More information about the cbe-oss-dev mailing list