[CELL] spufs: use find_first_bit() instead of sched_find_first_bit()
spu_sched->bitmap has MAX_PRIO(=140) width in bits.However, since
ff80a77f20
, 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 <Masato.Noguchi@jp.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
This commit is contained in:
committed by
Arnd Bergmann
parent
50af32a94b
commit
7e90b74967
@@ -502,7 +502,7 @@ static struct spu_context *grab_runnable_context(int prio, int node)
|
|||||||
int best;
|
int best;
|
||||||
|
|
||||||
spin_lock(&spu_prio->runq_lock);
|
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) {
|
while (best < prio) {
|
||||||
struct list_head *rq = &spu_prio->runq[best];
|
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]);
|
INIT_LIST_HEAD(&spu_prio->runq[i]);
|
||||||
__clear_bit(i, spu_prio->bitmap);
|
__clear_bit(i, spu_prio->bitmap);
|
||||||
}
|
}
|
||||||
__set_bit(MAX_PRIO, spu_prio->bitmap);
|
|
||||||
for (i = 0; i < MAX_NUMNODES; i++) {
|
for (i = 0; i < MAX_NUMNODES; i++) {
|
||||||
mutex_init(&spu_prio->active_mutex[i]);
|
mutex_init(&spu_prio->active_mutex[i]);
|
||||||
INIT_LIST_HEAD(&spu_prio->active_list[i]);
|
INIT_LIST_HEAD(&spu_prio->active_list[i]);
|
||||||
|
Reference in New Issue
Block a user