Lines Matching refs:cpumask
54 target_cpu = cpumask_first(pd->cpumask.pcpu); in padata_index_to_cpu()
56 target_cpu = cpumask_next(target_cpu, pd->cpumask.pcpu); in padata_index_to_cpu()
67 int cpu_index = seq_nr % cpumask_weight(pd->cpumask.pcpu); in padata_cpu_hash()
183 if (!cpumask_test_cpu(*cb_cpu, pd->cpumask.cbcpu)) { in padata_do_parallel()
184 if (cpumask_empty(pd->cpumask.cbcpu)) in padata_do_parallel()
188 cpu_index = *cb_cpu % cpumask_weight(pd->cpumask.cbcpu); in padata_do_parallel()
190 cpu = cpumask_first(pd->cpumask.cbcpu); in padata_do_parallel()
192 cpu = cpumask_next(cpu, pd->cpumask.cbcpu); in padata_do_parallel()
269 pd->cpu = cpumask_next_wrap(cpu, pd->cpumask.pcpu, -1, false); in padata_find_next()
426 cpumask_copy(attrs->cpumask, pinst->cpumask.pcpu); in padata_setup_cpumasks()
537 for_each_cpu(cpu, pd->cpumask.cbcpu) { in padata_init_squeues()
551 for_each_cpu(cpu, pd->cpumask.pcpu) { in padata_init_reorder_list()
577 if (!alloc_cpumask_var(&pd->cpumask.pcpu, GFP_KERNEL)) in padata_alloc_pd()
579 if (!alloc_cpumask_var(&pd->cpumask.cbcpu, GFP_KERNEL)) in padata_alloc_pd()
582 cpumask_and(pd->cpumask.pcpu, pinst->cpumask.pcpu, cpu_online_mask); in padata_alloc_pd()
583 cpumask_and(pd->cpumask.cbcpu, pinst->cpumask.cbcpu, cpu_online_mask); in padata_alloc_pd()
590 pd->cpu = cpumask_first(pd->cpumask.pcpu); in padata_alloc_pd()
596 free_cpumask_var(pd->cpumask.pcpu); in padata_alloc_pd()
609 free_cpumask_var(pd->cpumask.pcpu); in padata_free_pd()
610 free_cpumask_var(pd->cpumask.cbcpu); in padata_free_pd()
672 const struct cpumask *cpumask) in padata_validate_cpumask() argument
674 if (!cpumask_intersects(cpumask, cpu_online_mask)) { in padata_validate_cpumask()
701 cpumask_copy(pinst->cpumask.pcpu, pcpumask); in __padata_set_cpumasks()
702 cpumask_copy(pinst->cpumask.cbcpu, cbcpumask); in __padata_set_cpumasks()
723 cpumask_var_t cpumask) in padata_set_cpumask() argument
725 struct cpumask *serial_mask, *parallel_mask; in padata_set_cpumask()
733 serial_mask = pinst->cpumask.cbcpu; in padata_set_cpumask()
734 parallel_mask = cpumask; in padata_set_cpumask()
737 parallel_mask = pinst->cpumask.pcpu; in padata_set_cpumask()
738 serial_mask = cpumask; in padata_set_cpumask()
763 if (padata_validate_cpumask(pinst, pinst->cpumask.pcpu) && in __padata_add_cpu()
764 padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) in __padata_add_cpu()
776 if (!padata_validate_cpumask(pinst, pinst->cpumask.pcpu) || in __padata_remove_cpu()
777 !padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) in __padata_remove_cpu()
788 return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) || in pinst_has_cpu()
789 cpumask_test_cpu(cpu, pinst->cpumask.cbcpu); in pinst_has_cpu()
835 free_cpumask_var(pinst->cpumask.pcpu); in __padata_free()
836 free_cpumask_var(pinst->cpumask.cbcpu); in __padata_free()
863 struct cpumask *cpumask; in show_cpumask() local
868 cpumask = pinst->cpumask.cbcpu; in show_cpumask()
870 cpumask = pinst->cpumask.pcpu; in show_cpumask()
873 nr_cpu_ids, cpumask_bits(cpumask)); in show_cpumask()
994 if (!alloc_cpumask_var(&pinst->cpumask.pcpu, GFP_KERNEL)) in padata_alloc()
996 if (!alloc_cpumask_var(&pinst->cpumask.cbcpu, GFP_KERNEL)) { in padata_alloc()
997 free_cpumask_var(pinst->cpumask.pcpu); in padata_alloc()
1003 cpumask_copy(pinst->cpumask.pcpu, cpu_possible_mask); in padata_alloc()
1004 cpumask_copy(pinst->cpumask.cbcpu, cpu_possible_mask); in padata_alloc()
1026 free_cpumask_var(pinst->cpumask.pcpu); in padata_alloc()
1027 free_cpumask_var(pinst->cpumask.cbcpu); in padata_alloc()