Lines Matching +full:64 +full:m

389  * scx_cmask_clear - Zero every bit in @m's active range
390 * @m: cmask to clear
394 void scx_cmask_clear(struct scx_cmask *m) in scx_cmask_clear() argument
398 if (!m->nr_cids) in scx_cmask_clear()
400 nr_words = (m->base + m->nr_cids - 1) / 64 - m->base / 64 + 1; in scx_cmask_clear()
401 memset(m->bits, 0, nr_words * sizeof(u64)); in scx_cmask_clear()
405 * scx_cmask_fill - Set every bit in @m's active range
406 * @m: cmask to fill
410 void scx_cmask_fill(struct scx_cmask *m) in scx_cmask_fill() argument
414 if (!m->nr_cids) in scx_cmask_fill()
416 nr_words = (m->base + m->nr_cids - 1) / 64 - m->base / 64 + 1; in scx_cmask_fill()
417 memset(m->bits, 0xff, nr_words * sizeof(u64)); in scx_cmask_fill()
420 head_bits = m->base & 63; in scx_cmask_fill()
422 m->bits[0] &= ~((1ULL << head_bits) - 1); in scx_cmask_fill()
425 tail_bits = (m->base + m->nr_cids) & 63; in scx_cmask_fill()
427 m->bits[nr_words - 1] &= (1ULL << tail_bits) - 1; in scx_cmask_fill()
751 u32 a_word_off = a_base / 64; in cmask_walk_op2()
752 u32 b_word_off = b_base / 64; in cmask_walk_op2()
753 u32 lo_word = lo / 64; in cmask_walk_op2()
754 u32 hi_word = (hi - 1) / 64; in cmask_walk_op2()
809 u32 a_word_off = a_base / 64; in cmask_walk_op1()
810 u32 lo_word = lo / 64; in cmask_walk_op1()
811 u32 hi_word = (hi - 1) / 64; in cmask_walk_op1()
863 return cmask_walk_op1(&cm->bits[lo / 64 - cm->base / 64], lo, hi - lo, in cmask_any_set_in_range()
902 * scx_cmask_empty - Test whether @m has no bits set
903 * @m: cmask to test
905 * Return true iff @m's active range has no bits set.
907 bool scx_cmask_empty(const struct scx_cmask *m) in scx_cmask_empty() argument
909 return !cmask_any_set_in_range(m, m->base, m->base + m->nr_cids); in scx_cmask_empty()
1008 * @m: kernel address of the target cmask, storage sized for @nr_cids at @base
1014 * read from @m's header, so a concurrent BPF write to the header can't steer
1018 void scx_cmask_ref_init_kern(struct scx_sched *sch, struct scx_cmask *m, in scx_cmask_ref_init_kern() argument
1023 WRITE_ONCE(m->base, base); in scx_cmask_ref_init_kern()
1024 WRITE_ONCE(m->nr_cids, nr_cids); in scx_cmask_ref_init_kern()
1025 WRITE_ONCE(m->alloc_words, SCX_CMASK_NR_WORDS(nr_cids)); in scx_cmask_ref_init_kern()
1028 ref->src = m; in scx_cmask_ref_init_kern()
1070 nr_words = ((isect_end - 1) / 64) - (isect_base / 64) + 1; in scx_cmask_ref_shard()
1081 src_off = (isect_base / 64) - (ref->base / 64); in scx_cmask_ref_shard()
1135 struct scx_cmask *m = ref->src; in scx_cmask_ref_from_cpumask() local
1142 nr_words = (base + nr_cids - 1) / 64 - base / 64 + 1; in scx_cmask_ref_from_cpumask()
1144 u32 word_first_cid = (base / 64 + wi) * 64; in scx_cmask_ref_from_cpumask()
1148 for (bit = 0; bit < 64; bit++) { in scx_cmask_ref_from_cpumask()
1156 WRITE_ONCE(m->bits[wi], word); in scx_cmask_ref_from_cpumask()