[Cbe-oss-dev] [PATCH] spufs: fix incorrect initialization of cbe_spu_info.spus

Jeremy Kerr jk at ozlabs.org
Wed Jul 25 13:20:15 EST 2007


From: Masato Noguchi <Masato.Noguchi at jp.sony.com>

We currently initialize cbe_spu_info[].spus in both init_spu_base and
spu_sched_init. The initialise in spu_sched_init clears the SPU list,
so we end up with no physical SPUs. Because of this, the spu_run
syscall will block forever.

This change removes the unnecessary initialization in spu_sched_init.

Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---

Paul - this is a fix for 2.6.23.

---

 arch/powerpc/platforms/cell/spufs/sched.c |    4 ----
 1 file changed, 4 deletions(-)

Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/sched.c
+++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/sched.c
@@ -927,10 +927,6 @@ int __init spu_sched_init(void)
 		INIT_LIST_HEAD(&spu_prio->runq[i]);
 		__clear_bit(i, spu_prio->bitmap);
 	}
-	for (i = 0; i < MAX_NUMNODES; i++) {
-		mutex_init(&cbe_spu_info[i].list_mutex);
-		INIT_LIST_HEAD(&cbe_spu_info[i].spus);
-	}
 	spin_lock_init(&spu_prio->runq_lock);
 
 	setup_timer(&spusched_timer, spusched_wake, 0);



More information about the cbe-oss-dev mailing list