Home
last modified time | relevance | path

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

12

/Linux-v4.19/include/linux/
Dsbitmap.h224 #define SB_NR_TO_INDEX(sb, bitnr) ((bitnr) >> (sb)->shift) argument
225 #define SB_NR_TO_BIT(sb, bitnr) ((bitnr) & ((1U << (sb)->shift) - 1U)) argument
296 unsigned int bitnr) in __sbitmap_word() argument
298 return &sb->map[SB_NR_TO_INDEX(sb, bitnr)].word; in __sbitmap_word()
303 static inline void sbitmap_set_bit(struct sbitmap *sb, unsigned int bitnr) in sbitmap_set_bit() argument
305 set_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); in sbitmap_set_bit()
308 static inline void sbitmap_clear_bit(struct sbitmap *sb, unsigned int bitnr) in sbitmap_clear_bit() argument
310 clear_bit(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); in sbitmap_clear_bit()
314 unsigned int bitnr) in sbitmap_clear_bit_unlock() argument
316 clear_bit_unlock(SB_NR_TO_BIT(sb, bitnr), __sbitmap_word(sb, bitnr)); in sbitmap_clear_bit_unlock()
[all …]
/Linux-v4.19/net/xfrm/
Dxfrm_replay.c200 unsigned int bitnr, nr; in xfrm_replay_check_bmp() local
223 bitnr = (pos - diff) % replay_esn->replay_window; in xfrm_replay_check_bmp()
225 bitnr = replay_esn->replay_window - (diff - pos); in xfrm_replay_check_bmp()
227 nr = bitnr >> 5; in xfrm_replay_check_bmp()
228 bitnr = bitnr & 0x1F; in xfrm_replay_check_bmp()
229 if (replay_esn->bmp[nr] & (1U << bitnr)) in xfrm_replay_check_bmp()
243 unsigned int bitnr, nr, i; in xfrm_replay_advance_bmp() local
259 bitnr = (pos + i) % replay_esn->replay_window; in xfrm_replay_advance_bmp()
260 nr = bitnr >> 5; in xfrm_replay_advance_bmp()
261 bitnr = bitnr & 0x1F; in xfrm_replay_advance_bmp()
[all …]
/Linux-v4.19/drivers/block/drbd/
Ddrbd_bitmap.c316 static unsigned int bm_bit_to_page_idx(struct drbd_bitmap *b, u64 bitnr) in bm_bit_to_page_idx() argument
319 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx()
1368 unsigned long bitnr; in __bm_change_bits_to() local
1378 for (bitnr = s; bitnr <= e; bitnr++) { in __bm_change_bits_to()
1379 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to()
1393 c += (0 == __test_and_set_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr)); in __bm_change_bits_to()
1395 c -= (0 != __test_and_clear_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr)); in __bm_change_bits_to()
1558 int drbd_bm_test_bit(struct drbd_device *device, const unsigned long bitnr) in drbd_bm_test_bit() argument
1573 if (bitnr < b->bm_bits) { in drbd_bm_test_bit()
1574 p_addr = bm_map_pidx(b, bm_bit_to_page_idx(b, bitnr)); in drbd_bm_test_bit()
[all …]
/Linux-v4.19/block/
Dblk-mq-tag.c221 static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) in bt_iter() argument
230 bitnr += tags->nr_reserved_tags; in bt_iter()
231 rq = tags->rqs[bitnr]; in bt_iter()
262 static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data) in bt_tags_iter() argument
270 bitnr += tags->nr_reserved_tags; in bt_tags_iter()
276 rq = tags->rqs[bitnr]; in bt_tags_iter()
Dkyber-iosched.c604 static bool flush_busy_kcq(struct sbitmap *sb, unsigned int bitnr, void *data) in flush_busy_kcq() argument
607 struct kyber_ctx_queue *kcq = &flush_data->khd->kcqs[bitnr]; in flush_busy_kcq()
612 sbitmap_clear_bit(sb, bitnr); in flush_busy_kcq()
Dblk-mq.c892 static bool flush_busy_ctx(struct sbitmap *sb, unsigned int bitnr, void *data) in flush_busy_ctx() argument
896 struct blk_mq_ctx *ctx = hctx->ctxs[bitnr]; in flush_busy_ctx()
900 sbitmap_clear_bit(sb, bitnr); in flush_busy_ctx()
925 static bool dispatch_rq_from_ctx(struct sbitmap *sb, unsigned int bitnr, in dispatch_rq_from_ctx() argument
930 struct blk_mq_ctx *ctx = hctx->ctxs[bitnr]; in dispatch_rq_from_ctx()
937 sbitmap_clear_bit(sb, bitnr); in dispatch_rq_from_ctx()
/Linux-v4.19/drivers/hwmon/
Dw83781d.c465 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
466 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
474 int bitnr = (data->type == w83781d) ? 5 : 13; in show_temp3_alarm() local
475 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_temp3_alarm()
536 int bitnr = to_sensor_dev_attr(attr)->index; in show_beep() local
537 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); in show_beep()
545 int bitnr = to_sensor_dev_attr(attr)->index; in store_beep() local
559 data->beep_mask |= (1 << bitnr); in store_beep()
561 data->beep_mask &= ~(1 << bitnr); in store_beep()
563 if (bitnr < 8) { in store_beep()
[all …]
Dgl518sm.c466 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
468 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
482 int bitnr = to_sensor_dev_attr(attr)->index; in show_beep() local
484 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); in show_beep()
492 int bitnr = to_sensor_dev_attr(attr)->index; in set_beep() local
506 data->beep_mask |= (1 << bitnr); in set_beep()
508 data->beep_mask &= ~(1 << bitnr); in set_beep()
Dw83627hf.c847 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
848 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
908 int bitnr = to_sensor_dev_attr(attr)->index; in show_beep() local
909 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); in show_beep()
917 int bitnr = to_sensor_dev_attr(attr)->index; in store_beep() local
931 data->beep_mask |= (1 << bitnr); in store_beep()
933 data->beep_mask &= ~(1 << bitnr); in store_beep()
935 if (bitnr < 8) { in store_beep()
938 reg |= (1 << bitnr); in store_beep()
940 reg &= ~(1 << bitnr); in store_beep()
[all …]
Dad7414.c158 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
160 int value = (data->temp_input >> bitnr) & 1; in show_alarm()
Dmax6642.c251 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
253 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dmax1619.c186 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
188 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dlm92.c227 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
229 return sprintf(buf, "%d\n", (data->temp[t_input] >> bitnr) & 1); in show_alarm()
Dlm83.c203 int bitnr = attr->index; in show_alarm() local
205 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dlm77.c214 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
216 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dw83791d.c451 int bitnr = sensor_attr->index; in show_beep() local
453 return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); in show_beep()
463 int bitnr = sensor_attr->index; in store_beep() local
464 int bytenr = bitnr / 8; in store_beep()
480 data->beep_mask &= ~(1 << bitnr); in store_beep()
481 data->beep_mask |= val << bitnr; in store_beep()
497 int bitnr = sensor_attr->index; in show_alarm() local
499 return sprintf(buf, "%d\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dgl520sm.c699 int bitnr = to_sensor_dev_attr(attr)->index; in get_beep() local
702 return sprintf(buf, "%d\n", (data->beep_mask >> bitnr) & 1); in get_beep()
710 int bitnr = to_sensor_dev_attr(attr)->index; in set_beep() local
724 data->beep_mask |= (1 << bitnr); in set_beep()
726 data->beep_mask &= ~(1 << bitnr); in set_beep()
Dadm1025.c346 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
348 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dadm9240.c515 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
517 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dlm80.c447 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
451 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
Dsmsc47m1.c246 int bitnr = to_sensor_dev_attr(devattr)->index; in get_fan_alarm() local
248 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in get_fan_alarm()
Dvia686a.c595 int bitnr = to_sensor_dev_attr(attr)->index; in show_alarm() local
597 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in show_alarm()
/Linux-v4.19/drivers/gpio/
Dgpio-msic.c241 int bitnr; in msic_gpio_irq_handler() local
250 for_each_set_bit(bitnr, &pending, BITS_PER_BYTE) in msic_gpio_irq_handler()
252 (i * BITS_PER_BYTE) + bitnr); in msic_gpio_irq_handler()
/Linux-v4.19/sound/pci/oxygen/
Doxygen_mixer.c522 unsigned int bitnr = (ctl->private_value >> 8) & 0xff; in ac97_switch_get() local
529 if (!(reg & (1 << bitnr)) ^ !invert) in ac97_switch_get()
560 unsigned int bitnr = (ctl->private_value >> 8) & 0xff; in ac97_switch_put() local
569 newreg |= 1 << bitnr; in ac97_switch_put()
571 newreg &= ~(1 << bitnr); in ac97_switch_put()
588 bitnr == 15 && !(newreg & 0x8000)) { in ac97_switch_put()
741 #define AC97_SWITCH(xname, codec, index, bitnr, invert) { \ argument
748 ((bitnr) << 8) | (index), \
/Linux-v4.19/drivers/net/ethernet/aeroflex/
Dgreth.c1052 unsigned int bitnr; in greth_set_hash_filter() local
1057 bitnr = greth_hash_get_index(ha->addr); in greth_set_hash_filter()
1058 mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); in greth_set_hash_filter()

12