Home
last modified time | relevance | path

Searched refs:bm (Results 1 – 25 of 38) sorted by relevance

12

/drivers/comedi/
Dcomedi_buf.c23 struct comedi_buf_map *bm = in comedi_buf_map_kref_release() local
28 if (bm->page_list) { in comedi_buf_map_kref_release()
29 if (bm->dma_dir != DMA_NONE) { in comedi_buf_map_kref_release()
34 buf = &bm->page_list[0]; in comedi_buf_map_kref_release()
35 dma_free_coherent(bm->dma_hw_dev, in comedi_buf_map_kref_release()
36 PAGE_SIZE * bm->n_pages, in comedi_buf_map_kref_release()
39 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release()
40 buf = &bm->page_list[i]; in comedi_buf_map_kref_release()
45 vfree(bm->page_list); in comedi_buf_map_kref_release()
47 if (bm->dma_dir != DMA_NONE) in comedi_buf_map_kref_release()
[all …]
Dcomedi_internal.h31 void comedi_buf_map_get(struct comedi_buf_map *bm);
32 int comedi_buf_map_put(struct comedi_buf_map *bm);
33 int comedi_buf_map_access(struct comedi_buf_map *bm, unsigned long offset,
Dcomedi_fops.c2287 struct comedi_buf_map *bm; in comedi_vm_open() local
2289 bm = area->vm_private_data; in comedi_vm_open()
2290 comedi_buf_map_get(bm); in comedi_vm_open()
2295 struct comedi_buf_map *bm; in comedi_vm_close() local
2297 bm = area->vm_private_data; in comedi_vm_close()
2298 comedi_buf_map_put(bm); in comedi_vm_close()
2304 struct comedi_buf_map *bm = vma->vm_private_data; in comedi_vm_access() local
2312 return comedi_buf_map_access(bm, offset, buf, len, write); in comedi_vm_access()
2327 struct comedi_buf_map *bm = NULL; in comedi_mmap() local
2384 bm = comedi_buf_map_from_subdev_get(s); in comedi_mmap()
[all …]
/drivers/md/persistent-data/
Ddm-block-manager.c389 struct dm_block_manager *bm; in dm_block_manager_create() local
391 bm = kmalloc(sizeof(*bm), GFP_KERNEL); in dm_block_manager_create()
392 if (!bm) { in dm_block_manager_create()
397 bm->bufio = dm_bufio_client_create(bdev, block_size, max_held_per_thread, in dm_block_manager_create()
402 if (IS_ERR(bm->bufio)) { in dm_block_manager_create()
403 r = PTR_ERR(bm->bufio); in dm_block_manager_create()
404 kfree(bm); in dm_block_manager_create()
408 bm->read_only = false; in dm_block_manager_create()
410 return bm; in dm_block_manager_create()
417 void dm_block_manager_destroy(struct dm_block_manager *bm) in dm_block_manager_destroy() argument
[all …]
Ddm-block-manager.h38 void dm_block_manager_destroy(struct dm_block_manager *bm);
39 void dm_block_manager_reset(struct dm_block_manager *bm);
41 unsigned int dm_bm_block_size(struct dm_block_manager *bm);
42 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm);
75 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b,
79 int dm_bm_write_lock(struct dm_block_manager *bm, dm_block_t b,
87 int dm_bm_read_try_lock(struct dm_block_manager *bm, dm_block_t b,
95 int dm_bm_write_lock_zero(struct dm_block_manager *bm, dm_block_t b,
110 int dm_bm_flush(struct dm_block_manager *bm);
115 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b);
[all …]
Ddm-transaction-manager.c62 static void prefetch_issue(struct prefetch_set *p, struct dm_block_manager *bm) in prefetch_issue() argument
70 dm_bm_prefetch(bm, p->blocks[i]); in prefetch_issue()
94 struct dm_block_manager *bm; member
162 static struct dm_transaction_manager *dm_tm_create(struct dm_block_manager *bm, in dm_tm_create() argument
174 tm->bm = bm; in dm_tm_create()
223 return dm_bm_flush(tm->bm); in dm_tm_pre_commit()
235 return dm_bm_flush(tm->bm); in dm_tm_commit()
253 r = dm_bm_write_lock_zero(tm->bm, new_block, v, result); in dm_tm_new_block()
284 r = dm_bm_read_lock(tm->bm, orig, v, &orig_block); in __shadow_block()
295 r = dm_bm_write_lock_zero(tm->bm, new, v, result); in __shadow_block()
[all …]
Ddm-transaction-manager.h145 int dm_tm_create_with_sm(struct dm_block_manager *bm, dm_block_t sb_location,
149 int dm_tm_open_with_sm(struct dm_block_manager *bm, dm_block_t sb_location,
/drivers/power/supply/
Dab8500_fg.c231 struct ab8500_bm_data *bm; member
369 if (curr_ua > -di->bm->fg_params->high_curr_threshold_ua) in ab8500_fg_is_low_curr()
675 val = (val * QLSB_NANO_AMP_HOURS_X10 * 36 * 4) / di->bm->fg_res; in ab8500_fg_inst_curr_finalize()
799 (100 * di->bm->fg_res); in ab8500_fg_acc_cur_work()
807 (di->bm->fg_res * (di->fg_samples / 4)); in ab8500_fg_acc_cur_work()
816 di->bm->fg_res, di->fg_samples, val, di->accu_charge); in ab8500_fg_acc_cur_work()
859 struct power_supply_battery_info *bi = di->bm->bi; in ab8500_fg_volt_to_capacity()
889 struct power_supply_battery_info *bi = di->bm->bi; in ab8500_fg_battery_resistance()
919 __func__, di->bat_temp, resistance, di->bm->fg_res / 10, in ab8500_fg_battery_resistance()
920 (di->bm->fg_res / 10) + resistance); in ab8500_fg_battery_resistance()
[all …]
Dab8500_bmdata.c141 struct ab8500_bm_data *bm) in ab8500_bm_of_probe() argument
147 ret = power_supply_get_battery_info(psy, &bm->bi); in ab8500_bm_of_probe()
152 bi = bm->bi; in ab8500_bm_of_probe()
232 bm->temp_hysteresis = AB8500_TEMP_HYSTERESIS; in ab8500_bm_of_probe()
238 struct ab8500_bm_data *bm) in ab8500_bm_of_remove() argument
240 power_supply_put_battery_info(psy, bm->bi); in ab8500_bm_of_remove()
Dab8500_chargalg.c235 struct ab8500_bm_data *bm; member
322 struct power_supply_battery_info *bi = di->bm->bi; in ab8500_chargalg_check_charger_enable()
390 timer_expiration = di->bm->main_safety_tmr_h; in ab8500_chargalg_start_safety_timer()
394 timer_expiration = di->bm->usb_safety_tmr_h; in ab8500_chargalg_start_safety_timer()
653 struct power_supply_battery_info *bi = di->bm->bi; in ab8500_chargalg_check_temp()
669 di->t_hyst_norm = di->bm->temp_hysteresis; in ab8500_chargalg_check_temp()
676 di->t_hyst_norm = di->bm->temp_hysteresis; in ab8500_chargalg_check_temp()
685 di->t_hyst_lowhigh = di->bm->temp_hysteresis; in ab8500_chargalg_check_temp()
704 if (di->chg_info.usb_volt_uv > di->bm->chg_params->usb_volt_max_uv) in ab8500_chargalg_check_charger_voltage()
709 if (di->chg_info.ac_volt_uv > di->bm->chg_params->ac_volt_max_uv) in ab8500_chargalg_check_charger_voltage()
[all …]
Dab8500_btemp.c105 struct ab8500_bm_data *bm; member
239 struct power_supply_battery_info *bi = di->bm->bi; in ab8500_btemp_id()
319 interval = di->bm->temp_interval_chg; in ab8500_btemp_periodic_work()
321 interval = di->bm->temp_interval_nochg; in ab8500_btemp_periodic_work()
710 di->bm = &ab8500_bm_data; in ab8500_btemp_probe()
Dab8500-bm.h419 struct ab8500_bm_data *bm);
421 struct ab8500_bm_data *bm);
Dab8500_charger.c295 struct ab8500_bm_data *bm; member
1280 min_value = min(di->bm->chg_params->usb_curr_max_ua, ich_in_ua); in ab8500_charger_set_vbus_in_curr()
1437 di->bm->chg_params->ac_curr_max_ua); in ab8500_charger_ac_en()
1454 di->bm->chg_params->ac_curr_max_ua); in ab8500_charger_ac_en()
1470 if (!di->bm->enable_overshoot) in ab8500_charger_ac_en()
1630 if (!di->bm->enable_overshoot) in ab8500_charger_usb_en()
3145 (di->bm->bkup_bat_v & 0x3) | di->bm->bkup_bat_i); in ab8500_charger_init_hw_registers()
3411 di->bm = &ab8500_bm_data; in ab8500_charger_probe()
3611 ret = ab8500_bm_of_probe(di->usb_chg.psy, di->bm); in ab8500_charger_probe()
3678 ab8500_bm_of_remove(di->usb_chg.psy, di->bm); in ab8500_charger_probe()
[all …]
/drivers/md/
Ddm-clone-metadata.c142 struct dm_block_manager *bm; member
233 static int __superblock_all_zeroes(struct dm_block_manager *bm, bool *formatted) in __superblock_all_zeroes() argument
244 r = dm_bm_read_lock(bm, SUPERBLOCK_LOCATION, NULL, &sblock); in __superblock_all_zeroes()
254 BUG_ON(dm_bm_block_size(bm) % sizeof(__le64)); in __superblock_all_zeroes()
255 nr_words = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes()
276 return dm_bm_read_lock(cmd->bm, SUPERBLOCK_LOCATION, &sb_validator, sblock); in superblock_read_lock()
282 return dm_bm_write_lock_zero(cmd->bm, SUPERBLOCK_LOCATION, &sb_validator, sblock); in superblock_write_lock_zero()
341 r = dm_tm_open_with_sm(cmd->bm, SUPERBLOCK_LOCATION, in __open_metadata()
366 r = dm_tm_create_with_sm(cmd->bm, SUPERBLOCK_LOCATION, &cmd->tm, &cmd->sm); in __format_metadata()
428 r = __superblock_all_zeroes(cmd->bm, &formatted); in __open_or_format_metadata()
[all …]
Ddm-cache-metadata.c110 struct dm_block_manager *bm; member
242 return dm_bm_read_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_read_lock()
249 return dm_bm_write_lock_zero(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock_zero()
256 return dm_bm_write_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock()
262 static int __superblock_all_zeroes(struct dm_block_manager *bm, bool *result) in __superblock_all_zeroes() argument
268 unsigned int sb_block_size = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes()
273 r = dm_bm_read_lock(bm, CACHE_SUPERBLOCK_LOCATION, NULL, &b); in __superblock_all_zeroes()
396 r = dm_tm_create_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __format_metadata()
495 r = dm_tm_open_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __open_metadata()
524 r = __superblock_all_zeroes(cmd->bm, &unformatted); in __open_or_format_metadata()
[all …]
Ddm-thin-metadata.c152 struct dm_block_manager *bm; member
443 return dm_bm_write_lock_zero(pmd->bm, THIN_SUPERBLOCK_LOCATION, in superblock_lock_zero()
450 return dm_bm_write_lock(pmd->bm, THIN_SUPERBLOCK_LOCATION, in superblock_lock()
454 static int __superblock_all_zeroes(struct dm_block_manager *bm, int *result) in __superblock_all_zeroes() argument
460 unsigned int block_size = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes()
465 r = dm_bm_read_lock(bm, THIN_SUPERBLOCK_LOCATION, NULL, &b); in __superblock_all_zeroes()
603 r = dm_tm_create_with_sm(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __format_metadata()
694 r = dm_bm_read_lock(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __open_metadata()
716 r = dm_tm_open_with_sm(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __open_metadata()
775 r = __superblock_all_zeroes(pmd->bm, &unformatted); in __open_or_format_metadata()
[all …]
Ddm-era-target.c273 struct dm_block_manager *bm; member
314 return dm_bm_read_lock(md->bm, SUPERBLOCK_LOCATION, in superblock_read_lock()
321 return dm_bm_write_lock_zero(md->bm, SUPERBLOCK_LOCATION, in superblock_lock_zero()
328 return dm_bm_write_lock(md->bm, SUPERBLOCK_LOCATION, in superblock_lock()
333 static int superblock_all_zeroes(struct dm_block_manager *bm, bool *result) in superblock_all_zeroes() argument
339 unsigned int sb_block_size = dm_bm_block_size(bm) / sizeof(__le64); in superblock_all_zeroes()
344 r = dm_bm_read_lock(bm, SUPERBLOCK_LOCATION, NULL, &b); in superblock_all_zeroes()
450 r = dm_tm_create_with_sm(md->bm, SUPERBLOCK_LOCATION, in create_fresh_metadata()
592 r = dm_tm_open_with_sm(md->bm, SUPERBLOCK_LOCATION, in open_metadata()
627 r = superblock_all_zeroes(md->bm, &unformatted); in open_or_format_metadata()
[all …]
/drivers/block/drbd/
Ddrbd_bitmap.c485 unsigned long *p_addr, *bm; in bm_clear_surplus() local
498 bm = p_addr + (tmp/BITS_PER_LONG); in bm_clear_surplus()
504 cleared = hweight_long(*bm & ~mask); in bm_clear_surplus()
505 *bm &= mask; in bm_clear_surplus()
506 bm++; in bm_clear_surplus()
509 if (BITS_PER_LONG == 32 && ((bm - p_addr) & 1) == 1) { in bm_clear_surplus()
512 cleared += hweight_long(*bm); in bm_clear_surplus()
513 *bm = 0; in bm_clear_surplus()
522 unsigned long *p_addr, *bm; in bm_set_surplus() local
534 bm = p_addr + (tmp/BITS_PER_LONG); in bm_set_surplus()
[all …]
/drivers/irqchip/
Dirq-gic-v3-mbi.c24 unsigned long *bm; member
79 bitmap_release_region(mbi->bm, hwirq - mbi->spi_start, in mbi_free_msi()
93 offset = bitmap_find_free_region(mbi_ranges[i].bm, in mbi_irq_domain_alloc()
291 mbi_ranges[n].bm = bitmap_zalloc(mbi_ranges[n].nr_spis, GFP_KERNEL); in mbi_init()
292 if (!mbi_ranges[n].bm) { in mbi_init()
329 bitmap_free(mbi_ranges[n].bm); in mbi_init()
Dirq-gic-v2m.c71 unsigned long *bm; /* MSI vector bitmap */ member
172 bitmap_release_region(v2m->bm, hwirq - v2m->spi_start, in gicv2m_unalloc_msi()
186 offset = bitmap_find_free_region(tmp->bm, tmp->nr_spis, in gicv2m_irq_domain_alloc()
272 bitmap_free(v2m->bm); in gicv2m_teardown()
388 v2m->bm = bitmap_zalloc(v2m->nr_spis, GFP_KERNEL); in gicv2m_init_one()
389 if (!v2m->bm) { in gicv2m_init_one()
/drivers/net/pcs/
Dpcs-mtk-lynxi.c95 unsigned int bm, adv; in mtk_pcs_lynxi_get_state() local
98 regmap_read(mpcs->regmap, SGMSYS_PCS_CONTROL_1, &bm); in mtk_pcs_lynxi_get_state()
101 phylink_mii_c22_pcs_decode_state(state, FIELD_GET(SGMII_BMSR, bm), in mtk_pcs_lynxi_get_state()
/drivers/net/ethernet/intel/ice/
Dice_flex_pipe.h17 unsigned long *bm);
22 unsigned long *bm, struct list_head *fv_list);
/drivers/w1/
Dw1_int.c223 void w1_remove_master_device(struct w1_bus_master *bm) in w1_remove_master_device() argument
231 if (dev->bus_master->data == bm->data) { in w1_remove_master_device()
/drivers/gpu/drm/imx/ipuv3/
Dimx-ldb.c504 const char *bm; in of_get_bus_format() local
508 ret = of_property_read_string(np, "fsl,data-mapping", &bm); in of_get_bus_format()
515 if (!strcasecmp(bm, imx_ldb_bit_mappings[i].mapping) && in of_get_bus_format()
520 dev_err(dev, "invalid data mapping: %d-bit \"%s\"\n", datawidth, bm); in of_get_bus_format()
/drivers/input/
Dinput.c65 unsigned long *bm, unsigned int max) in is_event_supported() argument
67 return code <= max && test_bit(code, bm); in is_event_supported()
1378 char name, const unsigned long *bm, in input_print_modalias_bits() argument
1385 for_each_set_bit_from(bit, bm, max_bit) in input_print_modalias_bits()
1614 #define INPUT_DEV_CAP_ATTR(ev, bm) \ argument
1615 static ssize_t input_dev_show_cap_##bm(struct device *dev, \
1621 input_dev->bm##bit, ev##_MAX, \
1625 static DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL)
1743 #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ argument
1745 int err = input_add_uevent_bm_var(env, name, bm, max); \

12