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()
491 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]); in __spu_add_to_rq()
492 set_bit(ctx->prio, spu_prio->bitmap); in __spu_add_to_rq()
493 if (!spu_prio->nr_waiting++) in __spu_add_to_rq()
500 spin_lock(&spu_prio->runq_lock); in spu_add_to_rq()
502 spin_unlock(&spu_prio->runq_lock); in spu_add_to_rq()
510 if (!--spu_prio->nr_waiting) in __spu_del_from_rq()
514 if (list_empty(&spu_prio->runq[prio])) in __spu_del_from_rq()
515 clear_bit(prio, spu_prio->bitmap); in __spu_del_from_rq()
521 spin_lock(&spu_prio->runq_lock); in spu_del_from_rq()
523 spin_unlock(&spu_prio->runq_lock); in spu_del_from_rq()
537 spin_lock(&spu_prio->runq_lock); in spu_prio_wait()
541 spin_unlock(&spu_prio->runq_lock); in spu_prio_wait()
545 spin_lock(&spu_prio->runq_lock); in spu_prio_wait()
548 spin_unlock(&spu_prio->runq_lock); in spu_prio_wait()
824 spin_lock(&spu_prio->runq_lock); in grab_runnable_context()
825 best = find_first_bit(spu_prio->bitmap, prio); in grab_runnable_context()
827 struct list_head *rq = &spu_prio->runq[best]; in grab_runnable_context()
840 spin_unlock(&spu_prio->runq_lock); in grab_runnable_context()
955 nr_active += spu_prio->nr_waiting; in count_active_contexts()
1085 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); in spu_sched_init()
1086 if (!spu_prio) in spu_sched_init()
1090 INIT_LIST_HEAD(&spu_prio->runq[i]); in spu_sched_init()
1091 __clear_bit(i, spu_prio->bitmap); in spu_sched_init()
1093 spin_lock_init(&spu_prio->runq_lock); in spu_sched_init()
1117 kfree(spu_prio); in spu_sched_init()
1140 kfree(spu_prio); in spu_sched_exit()