From: Masato Noguchi Date: Fri, 20 Jul 2007 19:39:43 +0000 (+0200) Subject: [CELL] spufs: use find_first_bit() instead of sched_find_first_bit() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e90b74967ea54dbd6eb539e1cb151ec37f63d7f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [CELL] spufs: use find_first_bit() instead of sched_find_first_bit() spu_sched->bitmap has MAX_PRIO(=140) width in bits.However, since ff80a77f20f811c0cc5b251d0f657cbc6f788385, sched_find_first_bit() only supports 100-bit bitmaps. Thus, spu_sched->bitmap should be treated by generic find_first_bit(). Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index ecd9e95116ad..12c09665404d 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -502,7 +502,7 @@ static struct spu_context *grab_runnable_context(int prio, int node) int best; spin_lock(&spu_prio->runq_lock); - best = sched_find_first_bit(spu_prio->bitmap); + best = find_first_bit(spu_prio->bitmap, prio); while (best < prio) { struct list_head *rq = &spu_prio->runq[best]; @@ -738,7 +738,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]);