Lines Matching refs:cpu

132 static __always_inline void cpu_max_bits_warn(unsigned int cpu, unsigned int bits)  in cpu_max_bits_warn()  argument
135 WARN_ON_ONCE(cpu >= bits); in cpu_max_bits_warn()
140 static __always_inline unsigned int cpumask_check(unsigned int cpu) in cpumask_check() argument
142 cpu_max_bits_warn(cpu, small_cpumask_bits); in cpumask_check()
143 return cpu; in cpumask_check()
294 #define for_each_cpu(cpu, mask) \ argument
295 for_each_set_bit(cpu, cpumask_bits(mask), small_cpumask_bits)
328 #define for_each_cpu_wrap(cpu, mask, start) \ argument
329 for_each_set_bit_wrap(cpu, cpumask_bits(mask), small_cpumask_bits, start)
345 #define for_each_cpu_and(cpu, mask1, mask2) \ argument
346 for_each_and_bit(cpu, cpumask_bits(mask1), cpumask_bits(mask2), small_cpumask_bits)
363 #define for_each_cpu_andnot(cpu, mask1, mask2) \ argument
364 for_each_andnot_bit(cpu, cpumask_bits(mask1), cpumask_bits(mask2), small_cpumask_bits)
380 #define for_each_cpu_or(cpu, mask1, mask2) \ argument
381 for_each_or_bit(cpu, cpumask_bits(mask1), cpumask_bits(mask2), small_cpumask_bits)
390 #define for_each_cpu_from(cpu, mask) \ argument
391 for_each_set_bit_from(cpu, cpumask_bits(mask), small_cpumask_bits)
402 unsigned int cpumask_any_but(const struct cpumask *mask, unsigned int cpu) in cpumask_any_but() argument
406 cpumask_check(cpu); in cpumask_any_but()
408 if (i != cpu) in cpumask_any_but()
424 unsigned int cpu) in cpumask_any_and_but()
428 cpumask_check(cpu); in cpumask_any_and_but()
430 if (i != cpu) in cpumask_any_and_but()
433 return cpumask_next_and(cpu, mask1, mask2); in cpumask_any_and_but()
444 unsigned int cpumask_nth(unsigned int cpu, const struct cpumask *srcp) in cpumask_nth() argument
446 return find_nth_bit(cpumask_bits(srcp), small_cpumask_bits, cpumask_check(cpu)); in cpumask_nth()
458 unsigned int cpumask_nth_and(unsigned int cpu, const struct cpumask *srcp1, in cpumask_nth_and() argument
462 small_cpumask_bits, cpumask_check(cpu)); in cpumask_nth_and()
474 unsigned int cpumask_nth_andnot(unsigned int cpu, const struct cpumask *srcp1, in cpumask_nth_andnot() argument
478 small_cpumask_bits, cpumask_check(cpu)); in cpumask_nth_andnot()
491 unsigned int cpumask_nth_and_andnot(unsigned int cpu, const struct cpumask *srcp1, in cpumask_nth_and_andnot() argument
498 small_cpumask_bits, cpumask_check(cpu)); in cpumask_nth_and_andnot()
517 void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) in cpumask_set_cpu() argument
519 set_bit(cpumask_check(cpu), cpumask_bits(dstp)); in cpumask_set_cpu()
523 void __cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) in __cpumask_set_cpu() argument
525 __set_bit(cpumask_check(cpu), cpumask_bits(dstp)); in __cpumask_set_cpu()
534 static __always_inline void cpumask_clear_cpu(int cpu, struct cpumask *dstp) in cpumask_clear_cpu() argument
536 clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); in cpumask_clear_cpu()
539 static __always_inline void __cpumask_clear_cpu(int cpu, struct cpumask *dstp) in __cpumask_clear_cpu() argument
541 __clear_bit(cpumask_check(cpu), cpumask_bits(dstp)); in __cpumask_clear_cpu()
550 static __always_inline void cpumask_assign_cpu(int cpu, struct cpumask *dstp, bool value) in cpumask_assign_cpu() argument
552 assign_bit(cpumask_check(cpu), cpumask_bits(dstp), value); in cpumask_assign_cpu()
555 static __always_inline void __cpumask_assign_cpu(int cpu, struct cpumask *dstp, bool value) in __cpumask_assign_cpu() argument
557 __assign_bit(cpumask_check(cpu), cpumask_bits(dstp), value); in __cpumask_assign_cpu()
568 bool cpumask_test_cpu(int cpu, const struct cpumask *cpumask) in cpumask_test_cpu() argument
570 return test_bit(cpumask_check(cpu), cpumask_bits((cpumask))); in cpumask_test_cpu()
583 bool cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) in cpumask_test_and_set_cpu() argument
585 return test_and_set_bit(cpumask_check(cpu), cpumask_bits(cpumask)); in cpumask_test_and_set_cpu()
598 bool cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) in cpumask_test_and_clear_cpu() argument
600 return test_and_clear_bit(cpumask_check(cpu), cpumask_bits(cpumask)); in cpumask_test_and_clear_cpu()
863 #define cpumask_of(cpu) (get_cpu_mask(cpu)) argument
1033 #define for_each_possible_cpu(cpu) for ((cpu) = 0; (cpu) < 1; (cpu)++) argument
1034 #define for_each_online_cpu(cpu) for ((cpu) = 0; (cpu) < 1; (cpu)++) argument
1035 #define for_each_present_cpu(cpu) for ((cpu) = 0; (cpu) < 1; (cpu)++) argument
1037 #define for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask) argument
1038 #define for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask) argument
1039 #define for_each_enabled_cpu(cpu) for_each_cpu((cpu), cpu_enabled_mask) argument
1040 #define for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask) argument
1048 #define assign_cpu(cpu, mask, val) \ argument
1049 assign_bit(cpumask_check(cpu), cpumask_bits(mask), (val))
1051 #define set_cpu_possible(cpu, possible) assign_cpu((cpu), &__cpu_possible_mask, (possible)) argument
1052 #define set_cpu_enabled(cpu, enabled) assign_cpu((cpu), &__cpu_enabled_mask, (enabled)) argument
1053 #define set_cpu_present(cpu, present) assign_cpu((cpu), &__cpu_present_mask, (present)) argument
1054 #define set_cpu_active(cpu, active) assign_cpu((cpu), &__cpu_active_mask, (active)) argument
1055 #define set_cpu_dying(cpu, dying) assign_cpu((cpu), &__cpu_dying_mask, (dying)) argument
1057 void set_cpu_online(unsigned int cpu, bool online);
1088 static __always_inline const struct cpumask *get_cpu_mask(unsigned int cpu) in get_cpu_mask() argument
1090 const unsigned long *p = cpu_bit_bitmap[1 + cpu % BITS_PER_LONG]; in get_cpu_mask()
1091 p -= cpu / BITS_PER_LONG; in get_cpu_mask()
1115 static __always_inline bool cpu_online(unsigned int cpu) in cpu_online() argument
1117 return cpumask_test_cpu(cpu, cpu_online_mask); in cpu_online()
1120 static __always_inline bool cpu_enabled(unsigned int cpu) in cpu_enabled() argument
1122 return cpumask_test_cpu(cpu, cpu_enabled_mask); in cpu_enabled()
1125 static __always_inline bool cpu_possible(unsigned int cpu) in cpu_possible() argument
1127 return cpumask_test_cpu(cpu, cpu_possible_mask); in cpu_possible()
1130 static __always_inline bool cpu_present(unsigned int cpu) in cpu_present() argument
1132 return cpumask_test_cpu(cpu, cpu_present_mask); in cpu_present()
1135 static __always_inline bool cpu_active(unsigned int cpu) in cpu_active() argument
1137 return cpumask_test_cpu(cpu, cpu_active_mask); in cpu_active()
1140 static __always_inline bool cpu_dying(unsigned int cpu) in cpu_dying() argument
1142 return cpumask_test_cpu(cpu, cpu_dying_mask); in cpu_dying()
1153 static __always_inline bool cpu_online(unsigned int cpu) in cpu_online() argument
1155 return cpu == 0; in cpu_online()
1158 static __always_inline bool cpu_possible(unsigned int cpu) in cpu_possible() argument
1160 return cpu == 0; in cpu_possible()
1163 static __always_inline bool cpu_enabled(unsigned int cpu) in cpu_enabled() argument
1165 return cpu == 0; in cpu_enabled()
1168 static __always_inline bool cpu_present(unsigned int cpu) in cpu_present() argument
1170 return cpu == 0; in cpu_present()
1173 static __always_inline bool cpu_active(unsigned int cpu) in cpu_active() argument
1175 return cpu == 0; in cpu_active()
1178 static __always_inline bool cpu_dying(unsigned int cpu) in cpu_dying() argument
1185 #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) argument