Lines Matching refs:spu_prio
49 static struct spu_prio_array *spu_prio; variable
171 spin_lock(&spu_prio->runq_lock); in node_allowed()
173 spin_unlock(&spu_prio->runq_lock); in node_allowed()
497 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]); in __spu_add_to_rq()
498 set_bit(ctx->prio, spu_prio->bitmap); in __spu_add_to_rq()
499 if (!spu_prio->nr_waiting++) in __spu_add_to_rq()
506 spin_lock(&spu_prio->runq_lock); in spu_add_to_rq()
508 spin_unlock(&spu_prio->runq_lock); in spu_add_to_rq()
516 if (!--spu_prio->nr_waiting) in __spu_del_from_rq()
520 if (list_empty(&spu_prio->runq[prio])) in __spu_del_from_rq()
521 clear_bit(prio, spu_prio->bitmap); in __spu_del_from_rq()
527 spin_lock(&spu_prio->runq_lock); in spu_del_from_rq()
529 spin_unlock(&spu_prio->runq_lock); in spu_del_from_rq()
543 spin_lock(&spu_prio->runq_lock); in spu_prio_wait()
547 spin_unlock(&spu_prio->runq_lock); in spu_prio_wait()
551 spin_lock(&spu_prio->runq_lock); in spu_prio_wait()
554 spin_unlock(&spu_prio->runq_lock); in spu_prio_wait()
830 spin_lock(&spu_prio->runq_lock); in grab_runnable_context()
831 best = find_first_bit(spu_prio->bitmap, prio); in grab_runnable_context()
833 struct list_head *rq = &spu_prio->runq[best]; in grab_runnable_context()
846 spin_unlock(&spu_prio->runq_lock); in grab_runnable_context()
961 nr_active += spu_prio->nr_waiting; in count_active_contexts()
1089 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); in spu_sched_init()
1090 if (!spu_prio) in spu_sched_init()
1094 INIT_LIST_HEAD(&spu_prio->runq[i]); in spu_sched_init()
1095 __clear_bit(i, spu_prio->bitmap); in spu_sched_init()
1097 spin_lock_init(&spu_prio->runq_lock); in spu_sched_init()
1121 kfree(spu_prio); in spu_sched_init()
1144 kfree(spu_prio); in spu_sched_exit()