Home
last modified time | relevance | path

Searched refs:bitnr (Results 1 – 25 of 39) sorted by relevance

12

/openbmc/linux/include/linux/
H A Dsbitmap.h237 #define SB_NR_TO_INDEX(sb, bitnr) ((bitnr) >> (sb)->shift) argument
238 #define SB_NR_TO_BIT(sb, bitnr) ((bitnr) & ((1U << (sb)->shift) - 1U)) argument
311 unsigned int bitnr) in __sbitmap_word() argument
313 return &sb->map[SB_NR_TO_INDEX(sb, bitnr)].word; in __sbitmap_word()
320 set_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); in sbitmap_set_bit()
325 clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); in sbitmap_clear_bit()
336 unsigned long *addr = &sb->map[SB_NR_TO_INDEX(sb, bitnr)].cleared; in sbitmap_deferred_clear_bit()
338 set_bit(SB_NR_TO_BIT(sb, bitnr), addr); in sbitmap_deferred_clear_bit()
347 sbitmap_deferred_clear_bit(sb, bitnr); in sbitmap_put()
350 *raw_cpu_ptr(sb->alloc_hint) = bitnr; in sbitmap_put()
[all …]
/openbmc/linux/net/xfrm/
H A Dxfrm_replay.c243 nr = bitnr >> 5; in xfrm_replay_check_bmp()
244 bitnr = bitnr & 0x1F; in xfrm_replay_check_bmp()
276 nr = bitnr >> 5; in xfrm_replay_advance_bmp()
277 bitnr = bitnr & 0x1F; in xfrm_replay_advance_bmp()
297 nr = bitnr >> 5; in xfrm_replay_advance_bmp()
298 bitnr = bitnr & 0x1F; in xfrm_replay_advance_bmp()
496 nr = bitnr >> 5; in xfrm_replay_check_esn()
497 bitnr = bitnr & 0x1F; in xfrm_replay_check_esn()
578 bitnr = bitnr & 0x1F; in xfrm_replay_advance_esn()
603 nr = bitnr >> 5; in xfrm_replay_advance_esn()
[all …]
/openbmc/qemu/hw/ppc/
H A Dspapr_ovec.c104 void spapr_ovec_set(SpaprOptionVector *ov, long bitnr) in spapr_ovec_set() argument
107 g_assert(bitnr < OV_MAXBITS); in spapr_ovec_set()
109 set_bit(bitnr, ov->bitmap); in spapr_ovec_set()
112 void spapr_ovec_clear(SpaprOptionVector *ov, long bitnr) in spapr_ovec_clear() argument
115 g_assert(bitnr < OV_MAXBITS); in spapr_ovec_clear()
117 clear_bit(bitnr, ov->bitmap); in spapr_ovec_clear()
120 bool spapr_ovec_test(SpaprOptionVector *ov, long bitnr) in spapr_ovec_test() argument
123 g_assert(bitnr < OV_MAXBITS); in spapr_ovec_test()
125 return test_bit(bitnr, ov->bitmap) ? true : false; in spapr_ovec_test()
/openbmc/qemu/include/hw/ppc/
H A Dspapr_ovec.h72 void spapr_ovec_set(SpaprOptionVector *ov, long bitnr);
73 void spapr_ovec_clear(SpaprOptionVector *ov, long bitnr);
74 bool spapr_ovec_test(SpaprOptionVector *ov, long bitnr);
/openbmc/linux/block/
H A Dblk-mq-tag.c254 unsigned int bitnr) in blk_mq_find_and_get_req() argument
260 rq = tags->rqs[bitnr]; in blk_mq_find_and_get_req()
261 if (!rq || rq->tag != bitnr || !req_ref_inc_not_zero(rq)) in blk_mq_find_and_get_req()
267 static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) in bt_iter() argument
283 bitnr += tags->nr_reserved_tags; in bt_iter()
288 rq = blk_mq_find_and_get_req(tags, bitnr); in bt_iter()
339 static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) in bt_tags_iter() argument
348 bitnr += tags->nr_reserved_tags; in bt_tags_iter()
355 rq = tags->static_rqs[bitnr]; in bt_tags_iter()
357 rq = blk_mq_find_and_get_req(tags, bitnr); in bt_tags_iter()
H A Dkyber-iosched.c667 static bool flush_busy_kcq(struct sbitmap *sb, unsigned int bitnr, void *data) in flush_busy_kcq() argument
670 struct kyber_ctx_queue *kcq = &flush_data->khd->kcqs[bitnr]; in flush_busy_kcq()
675 sbitmap_clear_bit(sb, bitnr); in flush_busy_kcq()
/openbmc/linux/drivers/block/drbd/
H A Ddrbd_bitmap.c307 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx()
1391 unsigned long bitnr; in __bm_change_bits_to() local
1401 for (bitnr = s; bitnr <= e; bitnr++) { in __bm_change_bits_to()
1402 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to()
1596 if (bitnr < b->bm_bits) { in drbd_bm_test_bit()
1597 p_addr = bm_map_pidx(b, bm_bit_to_page_idx(b, bitnr)); in drbd_bm_test_bit()
1600 } else if (bitnr == b->bm_bits) { in drbd_bm_test_bit()
1617 unsigned long bitnr; in drbd_bm_count_bits() local
1633 for (bitnr = s; bitnr <= e; bitnr++) { in drbd_bm_count_bits()
1634 unsigned int idx = bm_bit_to_page_idx(b, bitnr); in drbd_bm_count_bits()
[all …]
/openbmc/qemu/tests/qtest/
H A Dtest-x86-cpuid-compat.c112 int bitnr; member
159 g_assert(!!(value & (1U << args->bitnr)) == args->expected_value); in test_feature_flag()
174 int bitnr, bool expected_value) in add_feature_test() argument
193 args->bitnr = bitnr; in add_feature_test()
/openbmc/linux/drivers/hwmon/
H A Dw83781d.c452 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
546 data->beep_mask |= (1 << bitnr); in store_beep()
548 data->beep_mask &= ~(1 << bitnr); in store_beep()
550 if (bitnr < 8) { in store_beep()
553 reg |= (1 << bitnr); in store_beep()
555 reg &= ~(1 << bitnr); in store_beep()
557 } else if (bitnr < 16) { in store_beep()
560 reg |= (1 << (bitnr - 8)); in store_beep()
562 reg &= ~(1 << (bitnr - 8)); in store_beep()
567 reg |= (1 << (bitnr - 16)); in store_beep()
[all …]
H A Dgl518sm.c451 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
453 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in alarm_show()
467 int bitnr = to_sensor_dev_attr(attr)->index; in beep_show() local
469 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); in beep_show()
477 int bitnr = to_sensor_dev_attr(attr)->index; in beep_store() local
491 data->beep_mask |= (1 << bitnr); in beep_store()
493 data->beep_mask &= ~(1 << bitnr); in beep_store()
H A Dw83627hf.c911 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
958 data->beep_mask |= (1 << bitnr); in beep_store()
960 data->beep_mask &= ~(1 << bitnr); in beep_store()
962 if (bitnr < 8) { in beep_store()
965 reg |= (1 << bitnr); in beep_store()
967 reg &= ~(1 << bitnr); in beep_store()
969 } else if (bitnr < 16) { in beep_store()
972 reg |= (1 << (bitnr - 8)); in beep_store()
974 reg &= ~(1 << (bitnr - 8)); in beep_store()
979 reg |= (1 << (bitnr - 16)); in beep_store()
[all …]
H A Dad7414.c152 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
154 int value = (data->temp_input >> bitnr) & 1; in alarm_show()
H A Dmax6642.c239 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
241 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in alarm_show()
H A Dmax1619.c178 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
180 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in alarm_show()
H A Dlm92.c222 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
224 return sprintf(buf, "%d\n", (data->temp[t_input] >> bitnr) & 1); in alarm_show()
H A Dlm77.c206 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
208 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in alarm_show()
H A Dgl520sm.c671 int bitnr = to_sensor_dev_attr(attr)->index; in beep_show() local
674 return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); in beep_show()
682 int bitnr = to_sensor_dev_attr(attr)->index; in beep_store() local
696 data->beep_mask |= (1 << bitnr); in beep_store()
698 data->beep_mask &= ~(1 << bitnr); in beep_store()
H A Dw83791d.c434 int bitnr = sensor_attr->index; in show_beep() local
436 return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); in show_beep()
446 int bitnr = sensor_attr->index; in store_beep() local
447 int bytenr = bitnr / 8; in store_beep()
463 data->beep_mask &= ~(1 << bitnr); in store_beep()
464 data->beep_mask |= val << bitnr; in store_beep()
480 int bitnr = sensor_attr->index; in show_alarm() local
482 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in show_alarm()
H A Dadm1025.c337 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
339 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in alarm_show()
H A Dlm80.c443 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show() local
447 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in alarm_show()
H A Dsmsc47m1.c238 int bitnr = to_sensor_dev_attr(devattr)->index; in fan_alarm_show() local
240 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in fan_alarm_show()
/openbmc/qemu/include/hw/
H A Dqdev-properties.h19 uint8_t bitnr; member
85 .bitnr = (_bit), \
99 .bitnr = (_bit), \
/openbmc/linux/sound/pci/oxygen/
H A Doxygen_mixer.c510 unsigned int bitnr = (ctl->private_value >> 8) & 0xff; in ac97_switch_get() local
517 if (!(reg & (1 << bitnr)) ^ !invert) in ac97_switch_get()
548 unsigned int bitnr = (ctl->private_value >> 8) & 0xff; in ac97_switch_put() local
557 newreg |= 1 << bitnr; in ac97_switch_put()
559 newreg &= ~(1 << bitnr); in ac97_switch_put()
576 bitnr == 15 && !(newreg & 0x8000)) { in ac97_switch_put()
729 #define AC97_SWITCH(xname, codec, index, bitnr, invert) { \ argument
736 ((bitnr) << 8) | (index), \
/openbmc/linux/drivers/net/ethernet/marvell/octeontx2/af/
H A Drvu_npc_fs.c605 u8 lid, lt, ld, bitnr; in npc_scan_kex() local
616 for_each_set_bit(bitnr, (unsigned long *)&masked_cfg, 31) { in npc_scan_kex()
617 npc_scan_parse_result(mcam, bitnr, key_nibble, intf); in npc_scan_kex()
626 bitnr = NPC_EXACT_NIBBLE_START; in npc_scan_kex()
627 for_each_set_bit_from(bitnr, (unsigned long *)&masked_cfg, NPC_EXACT_NIBBLE_END + 1) { in npc_scan_kex()
628 npc_scan_exact_result(mcam, bitnr, key_nibble, intf); in npc_scan_kex()
/openbmc/linux/drivers/net/ethernet/aeroflex/
H A Dgreth.c1049 unsigned int bitnr; in greth_set_hash_filter() local
1054 bitnr = greth_hash_get_index(ha->addr); in greth_set_hash_filter()
1055 mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); in greth_set_hash_filter()

12