Lines Matching refs:cp
67 static inline int __cpupri_find(struct cpupri *cp, struct task_struct *p, in __cpupri_find() argument
70 struct cpupri_vec *vec = &cp->pri_to_cpu[idx]; in __cpupri_find()
121 int cpupri_find(struct cpupri *cp, struct task_struct *p, in cpupri_find() argument
124 return cpupri_find_fitness(cp, p, lowest_mask, NULL); in cpupri_find()
144 int cpupri_find_fitness(struct cpupri *cp, struct task_struct *p, in cpupri_find_fitness() argument
155 if (!__cpupri_find(cp, p, lowest_mask, idx)) in cpupri_find_fitness()
195 return cpupri_find(cp, p, lowest_mask); in cpupri_find_fitness()
211 void cpupri_set(struct cpupri *cp, int cpu, int newpri) in cpupri_set() argument
213 int *currpri = &cp->cpu_to_pri[cpu]; in cpupri_set()
231 struct cpupri_vec *vec = &cp->pri_to_cpu[newpri]; in cpupri_set()
244 struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri]; in cpupri_set()
279 int cpupri_init(struct cpupri *cp) in cpupri_init() argument
284 struct cpupri_vec *vec = &cp->pri_to_cpu[i]; in cpupri_init()
291 cp->cpu_to_pri = kcalloc(nr_cpu_ids, sizeof(int), GFP_KERNEL); in cpupri_init()
292 if (!cp->cpu_to_pri) in cpupri_init()
296 cp->cpu_to_pri[i] = CPUPRI_INVALID; in cpupri_init()
302 free_cpumask_var(cp->pri_to_cpu[i].mask); in cpupri_init()
310 void cpupri_cleanup(struct cpupri *cp) in cpupri_cleanup() argument
314 kfree(cp->cpu_to_pri); in cpupri_cleanup()
316 free_cpumask_var(cp->pri_to_cpu[i].mask); in cpupri_cleanup()