[Cbe-oss-dev] [PATCH] spufs: use find_first_bit() instead of sched_find_first_bit()

Masato Noguchi Masato.Noguchi at jp.sony.com
Tue Jul 10 21:02:59 EST 2007


spu_sched->bitmap has MAX_PRIO(=140) width in bits.
However the latest sched_find_first_bit() supports only 100-bit bitmap.
(Please refer commit ff80a77f20f811c0cc5b251d0f657cbc6f788385 )

Thus, spu_sched->bitmap should be treated by generic find_first_bit().


Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
---

 sched.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

---
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 3b831e0..7411a4b 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -375,7 +375,7 @@ static struct spu_context *grab_runnable_context(int prio)
 	int best;
 
 	spin_lock(&spu_prio->runq_lock);
-	best = sched_find_first_bit(spu_prio->bitmap);
+	best = find_first_bit(spu_prio->bitmap, prio);
 	if (best < prio) {
 		struct list_head *rq = &spu_prio->runq[best];
 
@@ -486,7 +486,6 @@ int __init spu_sched_init(void)
 		INIT_LIST_HEAD(&spu_prio->runq[i]);
 		__clear_bit(i, spu_prio->bitmap);
 	}
-	__set_bit(MAX_PRIO, spu_prio->bitmap);
 	for (i = 0; i < MAX_NUMNODES; i++) {
 		mutex_init(&spu_prio->active_mutex[i]);
 		INIT_LIST_HEAD(&spu_prio->active_list[i]);




More information about the cbe-oss-dev mailing list