Lines Matching refs:cp
64 static inline int __cpupri_find(struct cpupri *cp, struct task_struct *p, in __cpupri_find() argument
68 struct cpupri_vec *vec = &cp->pri_to_cpu[idx]; in __cpupri_find()
124 int cpupri_find(struct cpupri *cp, struct task_struct *p, in cpupri_find() argument
127 return cpupri_find_fitness(cp, p, lowest_mask, NULL); in cpupri_find()
147 int cpupri_find_fitness(struct cpupri *cp, struct task_struct *p, in cpupri_find_fitness() argument
162 if (!__cpupri_find(cp, p, lowest_mask, idx, drop_nopreempts)) in cpupri_find_fitness()
213 return cpupri_find(cp, p, lowest_mask); in cpupri_find_fitness()
229 void cpupri_set(struct cpupri *cp, int cpu, int newpri) in cpupri_set() argument
231 int *currpri = &cp->cpu_to_pri[cpu]; in cpupri_set()
249 struct cpupri_vec *vec = &cp->pri_to_cpu[newpri]; in cpupri_set()
262 struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri]; in cpupri_set()
297 int cpupri_init(struct cpupri *cp) in cpupri_init() argument
302 struct cpupri_vec *vec = &cp->pri_to_cpu[i]; in cpupri_init()
309 cp->cpu_to_pri = kcalloc(nr_cpu_ids, sizeof(int), GFP_KERNEL); in cpupri_init()
310 if (!cp->cpu_to_pri) in cpupri_init()
314 cp->cpu_to_pri[i] = CPUPRI_INVALID; in cpupri_init()
320 free_cpumask_var(cp->pri_to_cpu[i].mask); in cpupri_init()
328 void cpupri_cleanup(struct cpupri *cp) in cpupri_cleanup() argument
332 kfree(cp->cpu_to_pri); in cpupri_cleanup()
334 free_cpumask_var(cp->pri_to_cpu[i].mask); in cpupri_cleanup()