/drivers/comedi/ |
D | comedi_buf.c | 24 struct comedi_buf_map *bm = in comedi_buf_map_kref_release() local 29 if (bm->page_list) { in comedi_buf_map_kref_release() 30 if (bm->dma_dir != DMA_NONE) { in comedi_buf_map_kref_release() 35 buf = &bm->page_list[0]; in comedi_buf_map_kref_release() 36 dma_free_coherent(bm->dma_hw_dev, in comedi_buf_map_kref_release() 37 PAGE_SIZE * bm->n_pages, in comedi_buf_map_kref_release() 40 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release() 41 buf = &bm->page_list[i]; in comedi_buf_map_kref_release() 46 vfree(bm->page_list); in comedi_buf_map_kref_release() 48 if (bm->dma_dir != DMA_NONE) in comedi_buf_map_kref_release() [all …]
|
D | comedi_internal.h | 31 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,
|
D | comedi_fops.c | 2282 struct comedi_buf_map *bm; in comedi_vm_open() local 2284 bm = area->vm_private_data; in comedi_vm_open() 2285 comedi_buf_map_get(bm); in comedi_vm_open() 2290 struct comedi_buf_map *bm; in comedi_vm_close() local 2292 bm = area->vm_private_data; in comedi_vm_close() 2293 comedi_buf_map_put(bm); in comedi_vm_close() 2299 struct comedi_buf_map *bm = vma->vm_private_data; in comedi_vm_access() local 2307 return comedi_buf_map_access(bm, offset, buf, len, write); in comedi_vm_access() 2322 struct comedi_buf_map *bm = NULL; in comedi_mmap() local 2379 bm = comedi_buf_map_from_subdev_get(s); in comedi_mmap() [all …]
|
/drivers/md/persistent-data/ |
D | dm-block-manager.c | 383 struct dm_block_manager *bm; in dm_block_manager_create() local 385 bm = kmalloc(sizeof(*bm), GFP_KERNEL); in dm_block_manager_create() 386 if (!bm) { in dm_block_manager_create() 391 bm->bufio = dm_bufio_client_create(bdev, block_size, max_held_per_thread, in dm_block_manager_create() 395 if (IS_ERR(bm->bufio)) { in dm_block_manager_create() 396 r = PTR_ERR(bm->bufio); in dm_block_manager_create() 397 kfree(bm); in dm_block_manager_create() 401 bm->read_only = false; in dm_block_manager_create() 403 return bm; in dm_block_manager_create() 410 void dm_block_manager_destroy(struct dm_block_manager *bm) in dm_block_manager_destroy() argument [all …]
|
D | dm-block-manager.h | 37 void dm_block_manager_destroy(struct dm_block_manager *bm); 39 unsigned dm_bm_block_size(struct dm_block_manager *bm); 40 dm_block_t dm_bm_nr_blocks(struct dm_block_manager *bm); 73 int dm_bm_read_lock(struct dm_block_manager *bm, dm_block_t b, 77 int dm_bm_write_lock(struct dm_block_manager *bm, dm_block_t b, 85 int dm_bm_read_try_lock(struct dm_block_manager *bm, dm_block_t b, 93 int dm_bm_write_lock_zero(struct dm_block_manager *bm, dm_block_t b, 108 int dm_bm_flush(struct dm_block_manager *bm); 113 void dm_bm_prefetch(struct dm_block_manager *bm, dm_block_t b); 126 bool dm_bm_is_read_only(struct dm_block_manager *bm); [all …]
|
D | dm-transaction-manager.c | 60 static void prefetch_issue(struct prefetch_set *p, struct dm_block_manager *bm) in prefetch_issue() argument 68 dm_bm_prefetch(bm, p->blocks[i]); in prefetch_issue() 92 struct dm_block_manager *bm; member 160 static struct dm_transaction_manager *dm_tm_create(struct dm_block_manager *bm, in dm_tm_create() argument 172 tm->bm = bm; in dm_tm_create() 218 return dm_bm_flush(tm->bm); in dm_tm_pre_commit() 230 return dm_bm_flush(tm->bm); in dm_tm_commit() 248 r = dm_bm_write_lock_zero(tm->bm, new_block, v, result); in dm_tm_new_block() 279 r = dm_bm_read_lock(tm->bm, orig, v, &orig_block); in __shadow_block() 290 r = dm_bm_write_lock_zero(tm->bm, new, v, result); in __shadow_block() [all …]
|
D | dm-transaction-manager.h | 144 int dm_tm_create_with_sm(struct dm_block_manager *bm, dm_block_t sb_location, 148 int dm_tm_open_with_sm(struct dm_block_manager *bm, dm_block_t sb_location,
|
/drivers/power/supply/ |
D | ab8500_chargalg.c | 252 struct ab8500_bm_data *bm; member 359 di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, in ab8500_chargalg_check_charger_enable() 360 di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); in ab8500_chargalg_check_charger_enable() 364 di->bm->bat_type[di->bm->batt_id].normal_vol_lvl, in ab8500_chargalg_check_charger_enable() 365 di->bm->bat_type[di->bm->batt_id].normal_cur_lvl); in ab8500_chargalg_check_charger_enable() 444 timer_expiration = di->bm->main_safety_tmr_h; in ab8500_chargalg_start_safety_timer() 448 timer_expiration = di->bm->usb_safety_tmr_h; in ab8500_chargalg_start_safety_timer() 725 if (di->batt_data.temp > (di->bm->temp_low + di->t_hyst_norm) && in ab8500_chargalg_check_temp() 726 di->batt_data.temp < (di->bm->temp_high - di->t_hyst_norm)) { in ab8500_chargalg_check_temp() 733 if (((di->batt_data.temp >= di->bm->temp_high) && in ab8500_chargalg_check_temp() [all …]
|
D | ab8500_bmdata.c | 493 struct ab8500_bm_data *bm) in ab8500_bm_of_probe() argument 515 bm->no_maintenance = true; in ab8500_bm_of_probe() 516 bm->chg_unknown_bat = true; in ab8500_bm_of_probe() 517 bm->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600; in ab8500_bm_of_probe() 518 bm->bat_type[BATTERY_UNKNOWN].termination_vol = 4150; in ab8500_bm_of_probe() 519 bm->bat_type[BATTERY_UNKNOWN].recharge_cap = 95; in ab8500_bm_of_probe() 520 bm->bat_type[BATTERY_UNKNOWN].normal_cur_lvl = 520; in ab8500_bm_of_probe() 521 bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl = 4200; in ab8500_bm_of_probe() 530 bm->n_btypes = 4; in ab8500_bm_of_probe() 531 bm->bat_type = bat_type_ext_thermistor; in ab8500_bm_of_probe() [all …]
|
D | ab8500_btemp.c | 106 struct ab8500_bm_data *bm; member 148 if (di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL) { in ab8500_btemp_batctrl_volt_to_res() 154 - di->bm->gnd_lift_resistance * inst_curr) in ab8500_btemp_batctrl_volt_to_res() 210 if (di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL && enable) { in ab8500_btemp_curr_source_enable() 243 } else if (di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL && !enable) { in ab8500_btemp_curr_source_enable() 459 id = di->bm->batt_id; in ab8500_btemp_measure_temp() 461 if (di->bm->adc_therm == AB8500_ADC_THERM_BATCTRL && in ab8500_btemp_measure_temp() 476 di->bm->bat_type[id].r_to_t_tbl, in ab8500_btemp_measure_temp() 477 di->bm->bat_type[id].n_temp_tbl_elements, rbat); in ab8500_btemp_measure_temp() 493 di->bm->bat_type[id].r_to_t_tbl, in ab8500_btemp_measure_temp() [all …]
|
D | ab8500_fg.c | 228 struct ab8500_bm_data *bm; member 366 if (curr > -di->bm->fg_params->high_curr_threshold) in ab8500_fg_is_low_curr() 673 (1000 * di->bm->fg_res); in ab8500_fg_inst_curr_finalize() 797 (100 * di->bm->fg_res); in ab8500_fg_acc_cur_work() 806 (1000 * di->bm->fg_res * (di->fg_samples / 4)); in ab8500_fg_acc_cur_work() 815 di->bm->fg_res, di->fg_samples, val, di->accu_charge); in ab8500_fg_acc_cur_work() 860 tbl = di->bm->bat_type[di->bm->batt_id].v_to_cap_tbl; in ab8500_fg_volt_to_capacity() 861 tbl_size = di->bm->bat_type[di->bm->batt_id].n_v_cap_tbl_elements; in ab8500_fg_volt_to_capacity() 913 tbl = di->bm->bat_type[di->bm->batt_id].batres_tbl; in ab8500_fg_battery_resistance() 914 tbl_size = di->bm->bat_type[di->bm->batt_id].n_batres_tbl_elements; in ab8500_fg_battery_resistance() [all …]
|
D | ab8500_charger.c | 295 struct ab8500_bm_data *bm; member 1032 if (curr < di->bm->chg_output_curr[0]) in ab8500_current_to_regval() 1035 for (i = 0; i < di->bm->n_chg_out_curr; i++) { in ab8500_current_to_regval() 1036 if (curr < di->bm->chg_output_curr[i]) in ab8500_current_to_regval() 1041 i = di->bm->n_chg_out_curr - 1; in ab8500_current_to_regval() 1042 if (curr == di->bm->chg_output_curr[i]) in ab8500_current_to_regval() 1052 if (curr < di->bm->chg_input_curr[0]) in ab8500_vbus_in_curr_to_regval() 1055 for (i = 0; i < di->bm->n_chg_in_curr; i++) { in ab8500_vbus_in_curr_to_regval() 1056 if (curr < di->bm->chg_input_curr[i]) in ab8500_vbus_in_curr_to_regval() 1061 i = di->bm->n_chg_in_curr - 1; in ab8500_vbus_in_curr_to_regval() [all …]
|
/drivers/md/ |
D | dm-clone-metadata.c | 142 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 …]
|
D | dm-cache-metadata.c | 109 struct dm_block_manager *bm; member 240 return dm_bm_read_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_read_lock() 247 return dm_bm_write_lock_zero(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock_zero() 254 return dm_bm_write_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock() 260 static int __superblock_all_zeroes(struct dm_block_manager *bm, bool *result) in __superblock_all_zeroes() argument 266 unsigned sb_block_size = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes() 271 r = dm_bm_read_lock(bm, CACHE_SUPERBLOCK_LOCATION, NULL, &b); in __superblock_all_zeroes() 394 r = dm_tm_create_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __format_metadata() 493 r = dm_tm_open_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __open_metadata() 522 r = __superblock_all_zeroes(cmd->bm, &unformatted); in __open_or_format_metadata() [all …]
|
D | dm-thin-metadata.c | 149 struct dm_block_manager *bm; member 437 return dm_bm_write_lock_zero(pmd->bm, THIN_SUPERBLOCK_LOCATION, in superblock_lock_zero() 444 return dm_bm_write_lock(pmd->bm, THIN_SUPERBLOCK_LOCATION, in superblock_lock() 448 static int __superblock_all_zeroes(struct dm_block_manager *bm, int *result) in __superblock_all_zeroes() argument 454 unsigned block_size = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes() 459 r = dm_bm_read_lock(bm, THIN_SUPERBLOCK_LOCATION, NULL, &b); in __superblock_all_zeroes() 597 r = dm_tm_create_with_sm(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __format_metadata() 681 r = dm_bm_read_lock(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __open_metadata() 703 r = dm_tm_open_with_sm(pmd->bm, THIN_SUPERBLOCK_LOCATION, in __open_metadata() 756 r = __superblock_all_zeroes(pmd->bm, &unformatted); in __open_or_format_metadata() [all …]
|
D | dm-era-target.c | 263 struct dm_block_manager *bm; member 304 return dm_bm_read_lock(md->bm, SUPERBLOCK_LOCATION, in superblock_read_lock() 311 return dm_bm_write_lock_zero(md->bm, SUPERBLOCK_LOCATION, in superblock_lock_zero() 318 return dm_bm_write_lock(md->bm, SUPERBLOCK_LOCATION, in superblock_lock() 323 static int superblock_all_zeroes(struct dm_block_manager *bm, bool *result) in superblock_all_zeroes() argument 329 unsigned sb_block_size = dm_bm_block_size(bm) / sizeof(__le64); in superblock_all_zeroes() 334 r = dm_bm_read_lock(bm, SUPERBLOCK_LOCATION, NULL, &b); in superblock_all_zeroes() 439 r = dm_tm_create_with_sm(md->bm, SUPERBLOCK_LOCATION, in create_fresh_metadata() 581 r = dm_tm_open_with_sm(md->bm, SUPERBLOCK_LOCATION, in open_metadata() 616 r = superblock_all_zeroes(md->bm, &unformatted); in open_or_format_metadata() [all …]
|
/drivers/block/drbd/ |
D | drbd_bitmap.c | 485 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/ |
D | irq-gic-v3-mbi.c | 24 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() 293 mbi_ranges[n].bm = bitmap_zalloc(mbi_ranges[n].nr_spis, GFP_KERNEL); in mbi_init() 294 if (!mbi_ranges[n].bm) { in mbi_init() 331 bitmap_free(mbi_ranges[n].bm); in mbi_init()
|
D | irq-gic-v2m.c | 70 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() 389 v2m->bm = bitmap_zalloc(v2m->nr_spis, GFP_KERNEL); in gicv2m_init_one() 390 if (!v2m->bm) { in gicv2m_init_one()
|
/drivers/w1/ |
D | w1_int.c | 223 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/input/ |
D | input.c | 62 unsigned long *bm, unsigned int max) in is_event_supported() argument 64 return code <= max && test_bit(code, bm); in is_event_supported() 1360 char name, unsigned long *bm, in input_print_modalias_bits() argument 1367 if (bm[BIT_WORD(i)] & BIT_MASK(i)) in input_print_modalias_bits() 1541 #define INPUT_DEV_CAP_ATTR(ev, bm) \ argument 1542 static ssize_t input_dev_show_cap_##bm(struct device *dev, \ 1548 input_dev->bm##bit, ev##_MAX, \ 1552 static DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL) 1651 #define INPUT_ADD_HOTPLUG_BM_VAR(name, bm, max) \ argument 1653 int err = input_add_uevent_bm_var(env, name, bm, max); \
|
/drivers/gpu/drm/imx/ |
D | imx-ldb.c | 503 const char *bm; in of_get_bus_format() local 507 ret = of_property_read_string(np, "fsl,data-mapping", &bm); in of_get_bus_format() 514 if (!strcasecmp(bm, imx_ldb_bit_mappings[i].mapping) && in of_get_bus_format() 519 dev_err(dev, "invalid data mapping: %d-bit \"%s\"\n", datawidth, bm); in of_get_bus_format()
|
D | imx-tve.c | 468 const char *bm; in of_get_tve_mode() local 471 ret = of_property_read_string(np, "fsl,tve-mode", &bm); in of_get_tve_mode() 476 if (!strcasecmp(bm, imx_tve_modes[i])) in of_get_tve_mode()
|
/drivers/gpu/drm/armada/ |
D | armada_crtc.c | 335 uint32_t lm, rm, tm, bm, val, sclk; in armada_drm_crtc_mode_set_nofb() local 343 bm = adj->crtc_vsync_start - adj->crtc_vdisplay; in armada_drm_crtc_mode_set_nofb() 348 DRM_DEBUG_KMS("lm %d rm %d tm %d bm %d\n", lm, rm, tm, bm); in armada_drm_crtc_mode_set_nofb() 361 dcrtc->v[1].spu_v_porch = tm << 16 | bm; in armada_drm_crtc_mode_set_nofb()
|
/drivers/video/fbdev/matrox/ |
D | matroxfb_base.c | 228 u_int32_t bm; in matroxfb_enable_irq() local 231 bm = 0x220; in matroxfb_enable_irq() 233 bm = 0x020; in matroxfb_enable_irq() 242 mga_outl(M_ICLEAR, bm); in matroxfb_enable_irq() 243 mga_outl(M_IEN, mga_inl(M_IEN) | bm); in matroxfb_enable_irq() 248 if ((ien & bm) != bm) { in matroxfb_enable_irq() 250 mga_outl(M_IEN, ien | bm); in matroxfb_enable_irq()
|