Lines Matching refs:type
33 bool housekeeping_enabled(enum hk_type type)
35 return !!(housekeeping.flags & BIT(type));
39 int housekeeping_any_cpu(enum hk_type type)
44 if (housekeeping.flags & BIT(type)) {
45 cpu = sched_numa_find_closest(housekeeping.cpumasks[type], smp_processor_id());
49 cpu = cpumask_any_and(housekeeping.cpumasks[type], cpu_online_mask);
58 type != HK_TYPE_TIMER);
65 const struct cpumask *housekeeping_cpumask(enum hk_type type)
68 if (housekeeping.flags & BIT(type))
69 return housekeeping.cpumasks[type];
74 void housekeeping_affine(struct task_struct *t, enum hk_type type)
77 if (housekeeping.flags & BIT(type))
78 set_cpus_allowed_ptr(t, housekeeping.cpumasks[type]);
82 bool housekeeping_test_cpu(int cpu, enum hk_type type)
85 if (housekeeping.flags & BIT(type))
86 return cpumask_test_cpu(cpu, housekeeping.cpumasks[type]);
93 enum hk_type type;
103 for_each_set_bit(type, &housekeeping.flags, HK_TYPE_MAX) {
105 WARN_ON_ONCE(cpumask_empty(housekeeping.cpumasks[type]));
109 static void __init housekeeping_setup_type(enum hk_type type,
113 alloc_bootmem_cpumask_var(&housekeeping.cpumasks[type]);
114 cpumask_copy(housekeeping.cpumasks[type],
157 enum hk_type type;
159 for_each_set_bit(type, &flags, HK_TYPE_MAX)
160 housekeeping_setup_type(type, housekeeping_staging);
163 enum hk_type type;
166 for_each_set_bit(type, &iter_flags, HK_TYPE_MAX) {
168 housekeeping.cpumasks[type])) {
176 for_each_set_bit(type, &iter_flags, HK_TYPE_MAX)
177 housekeeping_setup_type(type, housekeeping_staging);