Lines Matching refs:cpumask
39 target_cpu = cpumask_first(pd->cpumask.pcpu); in padata_index_to_cpu()
41 target_cpu = cpumask_next(target_cpu, pd->cpumask.pcpu); in padata_index_to_cpu()
57 cpu_index = padata->seq_nr % cpumask_weight(pd->cpumask.pcpu); in padata_cpu_hash()
120 if (!cpumask_test_cpu(cb_cpu, pd->cpumask.cbcpu)) in padata_do_parallel()
181 num_cpus = cpumask_weight(pd->cpumask.pcpu); in padata_get_next()
364 const struct cpumask *pcpumask, in padata_setup_cpumasks()
365 const struct cpumask *cbcpumask) in padata_setup_cpumasks()
367 if (!alloc_cpumask_var(&pd->cpumask.pcpu, GFP_KERNEL)) in padata_setup_cpumasks()
370 cpumask_and(pd->cpumask.pcpu, pcpumask, cpu_active_mask); in padata_setup_cpumasks()
371 if (!alloc_cpumask_var(&pd->cpumask.cbcpu, GFP_KERNEL)) { in padata_setup_cpumasks()
372 free_cpumask_var(pd->cpumask.cbcpu); in padata_setup_cpumasks()
376 cpumask_and(pd->cpumask.cbcpu, cbcpumask, cpu_active_mask); in padata_setup_cpumasks()
392 for_each_cpu(cpu, pd->cpumask.cbcpu) { in padata_init_squeues()
407 for_each_cpu(cpu, pd->cpumask.pcpu) { in padata_init_pqueues()
419 num_cpus = cpumask_weight(pd->cpumask.pcpu); in padata_init_pqueues()
425 const struct cpumask *pcpumask, in padata_alloc_pd()
426 const struct cpumask *cbcpumask) in padata_alloc_pd()
467 free_cpumask_var(pd->cpumask.pcpu); in padata_free_pd()
468 free_cpumask_var(pd->cpumask.cbcpu); in padata_free_pd()
481 for_each_cpu(cpu, pd->cpumask.pcpu) { in padata_flush_queues()
491 for_each_cpu(cpu, pd->cpumask.cbcpu) { in padata_flush_queues()
531 if (!cpumask_equal(pd_old->cpumask.pcpu, pd_new->cpumask.pcpu)) in padata_replace()
533 if (!cpumask_equal(pd_old->cpumask.cbcpu, pd_new->cpumask.cbcpu)) in padata_replace()
542 &pd_new->cpumask); in padata_replace()
581 const struct cpumask *cpumask) in padata_validate_cpumask() argument
583 if (!cpumask_intersects(cpumask, cpu_active_mask)) { in padata_validate_cpumask()
614 cpumask_copy(pinst->cpumask.pcpu, pcpumask); in __padata_set_cpumasks()
615 cpumask_copy(pinst->cpumask.cbcpu, cbcpumask); in __padata_set_cpumasks()
662 cpumask_var_t cpumask) in padata_set_cpumask() argument
664 struct cpumask *serial_mask, *parallel_mask; in padata_set_cpumask()
672 serial_mask = pinst->cpumask.cbcpu; in padata_set_cpumask()
673 parallel_mask = cpumask; in padata_set_cpumask()
676 parallel_mask = pinst->cpumask.pcpu; in padata_set_cpumask()
677 serial_mask = cpumask; in padata_set_cpumask()
698 pd = padata_alloc_pd(pinst, pinst->cpumask.pcpu, in __padata_add_cpu()
699 pinst->cpumask.cbcpu); in __padata_add_cpu()
705 if (padata_validate_cpumask(pinst, pinst->cpumask.pcpu) && in __padata_add_cpu()
706 padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) in __padata_add_cpu()
736 cpumask_set_cpu(cpu, pinst->cpumask.cbcpu); in padata_add_cpu()
738 cpumask_set_cpu(cpu, pinst->cpumask.pcpu); in padata_add_cpu()
755 if (!padata_validate_cpumask(pinst, pinst->cpumask.pcpu) || in __padata_remove_cpu()
756 !padata_validate_cpumask(pinst, pinst->cpumask.cbcpu)) in __padata_remove_cpu()
759 pd = padata_alloc_pd(pinst, pinst->cpumask.pcpu, in __padata_remove_cpu()
760 pinst->cpumask.cbcpu); in __padata_remove_cpu()
792 cpumask_clear_cpu(cpu, pinst->cpumask.cbcpu); in padata_remove_cpu()
794 cpumask_clear_cpu(cpu, pinst->cpumask.pcpu); in padata_remove_cpu()
844 return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) || in pinst_has_cpu()
845 cpumask_test_cpu(cpu, pinst->cpumask.cbcpu); in pinst_has_cpu()
910 free_cpumask_var(pinst->cpumask.pcpu); in __padata_free()
911 free_cpumask_var(pinst->cpumask.cbcpu); in __padata_free()
936 struct cpumask *cpumask; in show_cpumask() local
941 cpumask = pinst->cpumask.cbcpu; in show_cpumask()
943 cpumask = pinst->cpumask.pcpu; in show_cpumask()
945 len = bitmap_scnprintf(buf, PAGE_SIZE, cpumask_bits(cpumask), in show_cpumask()
1067 const struct cpumask *pcpumask, in padata_alloc()
1068 const struct cpumask *cbcpumask) in padata_alloc()
1078 if (!alloc_cpumask_var(&pinst->cpumask.pcpu, GFP_KERNEL)) in padata_alloc()
1080 if (!alloc_cpumask_var(&pinst->cpumask.cbcpu, GFP_KERNEL)) { in padata_alloc()
1081 free_cpumask_var(pinst->cpumask.pcpu); in padata_alloc()
1096 cpumask_copy(pinst->cpumask.pcpu, pcpumask); in padata_alloc()
1097 cpumask_copy(pinst->cpumask.cbcpu, cbcpumask); in padata_alloc()
1116 free_cpumask_var(pinst->cpumask.pcpu); in padata_alloc()
1117 free_cpumask_var(pinst->cpumask.cbcpu); in padata_alloc()