/drivers/md/ |
D | dm-exception-store.c | 145 unsigned chunk_size; in set_chunk_size() local 147 if (kstrtouint(chunk_size_arg, 10, &chunk_size)) { in set_chunk_size() 152 if (!chunk_size) { in set_chunk_size() 153 store->chunk_size = store->chunk_mask = store->chunk_shift = 0; in set_chunk_size() 157 return dm_exception_store_set_chunk_size(store, chunk_size, error); in set_chunk_size() 161 unsigned chunk_size, in dm_exception_store_set_chunk_size() argument 165 if (!is_power_of_2(chunk_size)) { in dm_exception_store_set_chunk_size() 171 if (chunk_size % in dm_exception_store_set_chunk_size() 173 chunk_size % in dm_exception_store_set_chunk_size() 179 if (chunk_size > INT_MAX >> SECTOR_SHIFT) { in dm_exception_store_set_chunk_size() [all …]
|
D | dm-unstripe.c | 21 uint32_t chunk_size; member 61 if (kstrtouint(argv[1], 10, &uc->chunk_size) || !uc->chunk_size) { in unstripe_ctr() 87 uc->unstripe_offset = uc->unstripe * uc->chunk_size; in unstripe_ctr() 88 uc->unstripe_width = (uc->stripes - 1) * uc->chunk_size; in unstripe_ctr() 89 uc->chunk_shift = is_power_of_2(uc->chunk_size) ? fls(uc->chunk_size) - 1 : 0; in unstripe_ctr() 92 if (sector_div(tmp_len, uc->chunk_size)) { in unstripe_ctr() 97 if (dm_set_target_max_io_len(ti, uc->chunk_size)) { in unstripe_ctr() 126 sector_div(tmp_sector, uc->chunk_size); in map_to_core() 156 uc->stripes, (unsigned long long)uc->chunk_size, uc->unstripe, in unstripe_status() 175 limits->chunk_sectors = uc->chunk_size; in unstripe_io_hints()
|
D | dm-stripe.c | 35 uint32_t chunk_size; member 103 uint32_t chunk_size; in stripe_ctr() local 117 if (kstrtouint(argv[1], 10, &chunk_size) || !chunk_size) { in stripe_ctr() 130 if (sector_div(tmp_len, chunk_size)) { in stripe_ctr() 164 r = dm_set_target_max_io_len(ti, chunk_size); in stripe_ctr() 176 sc->chunk_size = chunk_size; in stripe_ctr() 177 if (chunk_size & (chunk_size - 1)) in stripe_ctr() 180 sc->chunk_size_shift = __ffs(chunk_size); in stripe_ctr() 223 chunk_offset = sector_div(chunk, sc->chunk_size); in stripe_map_sector() 225 chunk_offset = chunk & (sc->chunk_size - 1); in stripe_map_sector() [all …]
|
D | dm-snap-persistent.c | 81 __le32 chunk_size; member 172 len = ps->store->chunk_size << SECTOR_SHIFT; in alloc_area() 234 .sector = ps->store->chunk_size * chunk, in chunk_io() 235 .count = ps->store->chunk_size, in chunk_io() 301 memset(ps->area, 0, ps->store->chunk_size << SECTOR_SHIFT); in zero_memory_area() 314 unsigned chunk_size; in read_header() local 322 if (!ps->store->chunk_size) { in read_header() 323 ps->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS, in read_header() 326 ps->store->chunk_mask = ps->store->chunk_size - 1; in read_header() 327 ps->store->chunk_shift = __ffs(ps->store->chunk_size); in read_header() [all …]
|
D | dm-snap-transient.c | 45 if (size < (tc->next_free + store->chunk_size)) in transient_prepare_exception() 49 tc->next_free += store->chunk_size; in transient_prepare_exception() 97 DMEMIT(" N %llu", (unsigned long long)store->chunk_size); in transient_status()
|
D | dm-exception-store.h | 121 unsigned chunk_size; member 184 unsigned chunk_size,
|
D | dm-snap.c | 535 if (l->store->chunk_size < s->store->chunk_size) in __insert_snapshot() 852 unsigned chunk_size = 0; in __minimum_chunk_size() local 856 chunk_size = min_not_zero(chunk_size, in __minimum_chunk_size() 857 snap->store->chunk_size); in __minimum_chunk_size() 859 return (uint32_t) chunk_size; in __minimum_chunk_size() 1012 sector_t sector, unsigned chunk_size); 1078 io_size = linear_chunks * s->store->chunk_size; in snapshot_merge_next_chunks() 1373 s->store->chunk_size = 0; in snapshot_ctr() 1387 if (!s->store->chunk_size) { in snapshot_ctr() 1392 r = dm_set_target_max_io_len(ti, s->store->chunk_size); in snapshot_ctr() [all …]
|
/drivers/gpu/drm/i915/ |
D | i915_buddy.c | 92 int i915_buddy_init(struct i915_buddy_mm *mm, u64 size, u64 chunk_size) in i915_buddy_init() argument 97 if (size < chunk_size) in i915_buddy_init() 100 if (chunk_size < PAGE_SIZE) in i915_buddy_init() 103 if (!is_power_of_2(chunk_size)) in i915_buddy_init() 106 size = round_down(size, chunk_size); in i915_buddy_init() 109 mm->chunk_size = chunk_size; in i915_buddy_init() 110 mm->max_order = ilog2(size) - ilog2(chunk_size); in i915_buddy_init() 144 order = ilog2(root_size) - ilog2(chunk_size); in i915_buddy_init() 153 GEM_BUG_ON(i915_buddy_block_size(mm, root) < chunk_size); in i915_buddy_init() 200 offset + (mm->chunk_size << block_order)); in split_block() [all …]
|
D | i915_buddy.h | 66 u64 chunk_size; member 110 return mm->chunk_size << i915_buddy_block_order(block); in i915_buddy_block_size() 113 int i915_buddy_init(struct i915_buddy_mm *mm, u64 size, u64 chunk_size);
|
/drivers/gpu/drm/i915/selftests/ |
D | i915_buddy.c | 60 if (block_size < mm->chunk_size) { in igt_check_block() 70 if (!IS_ALIGNED(block_size, mm->chunk_size)) { in igt_check_block() 75 if (!IS_ALIGNED(offset, mm->chunk_size)) { in igt_check_block() 281 static void igt_mm_config(u64 *size, u64 *chunk_size) in igt_mm_config() argument 294 *chunk_size = ms; in igt_mm_config() 302 u64 chunk_size; in igt_buddy_alloc_smoke() local 306 igt_mm_config(&mm_size, &chunk_size); in igt_buddy_alloc_smoke() 308 pr_info("buddy_init with size=%llx, chunk_size=%llx\n", mm_size, chunk_size); in igt_buddy_alloc_smoke() 310 err = i915_buddy_init(&mm, mm_size, chunk_size); in igt_buddy_alloc_smoke() 618 u64 chunk_size; in igt_buddy_alloc_range() local [all …]
|
/drivers/net/ethernet/mellanox/mlxsw/ |
D | i2c.c | 319 int off = mlxsw_i2c->cmd.mb_off_in, chunk_size, i, j; in mlxsw_i2c_write() local 333 chunk_size = (in_mbox_size > mlxsw_i2c->block_size) ? in mlxsw_i2c_write() 335 write_tran.len = MLXSW_I2C_ADDR_WIDTH + chunk_size; in mlxsw_i2c_write() 338 mlxsw_i2c->block_size * i, chunk_size); in mlxsw_i2c_write() 358 off += chunk_size; in mlxsw_i2c_write() 359 in_mbox_size -= chunk_size; in mlxsw_i2c_write() 398 int num, chunk_size, reg_size, i, j; in mlxsw_i2c_cmd() local 446 chunk_size = (reg_size > mlxsw_i2c->block_size) ? in mlxsw_i2c_cmd() 448 read_tran[1].len = chunk_size; in mlxsw_i2c_cmd() 470 off += chunk_size; in mlxsw_i2c_cmd() [all …]
|
/drivers/rtc/ |
D | rtc-isl12026.c | 328 size_t chunk_size, num_written; in isl12026_nvm_write() local 348 chunk_size = round_down(offset, ISL12026_PAGESIZE) + in isl12026_nvm_write() 350 chunk_size = min(bytes, chunk_size); in isl12026_nvm_write() 355 memcpy(payload + 2, v + num_written, chunk_size); in isl12026_nvm_write() 358 msgs[0].len = chunk_size + 2; in isl12026_nvm_write() 368 bytes -= chunk_size; in isl12026_nvm_write() 369 offset += chunk_size; in isl12026_nvm_write() 370 num_written += chunk_size; in isl12026_nvm_write()
|
/drivers/net/wireless/marvell/libertas/ |
D | if_sdio.c | 444 u32 chunk_size; in if_sdio_prog_helper() local 473 chunk_size = min_t(size_t, size, 60); in if_sdio_prog_helper() 475 *((__le32*)chunk_buffer) = cpu_to_le32(chunk_size); in if_sdio_prog_helper() 476 memcpy(chunk_buffer + 4, firmware, chunk_size); in if_sdio_prog_helper() 485 firmware += chunk_size; in if_sdio_prog_helper() 486 size -= chunk_size; in if_sdio_prog_helper() 540 u32 chunk_size; in if_sdio_prog_real() local 611 chunk_size = min_t(size_t, req_size, 512); in if_sdio_prog_real() 613 memcpy(chunk_buffer, firmware, chunk_size); in if_sdio_prog_real() 619 chunk_buffer, roundup(chunk_size, 32)); in if_sdio_prog_real() [all …]
|
/drivers/net/wireless/ath/wcn36xx/ |
D | dxe.c | 238 int i, chunk_size = pool->chunk_size; in wcn36xx_dxe_init_tx_bd() local 249 bd_phy_addr += chunk_size; in wcn36xx_dxe_init_tx_bd() 250 bd_cpu_addr += chunk_size; in wcn36xx_dxe_init_tx_bd() 625 wcn->mgmt_mem_pool.chunk_size = WCN36XX_BD_CHUNK_SIZE + in wcn36xx_dxe_allocate_mem_pools() 628 s = wcn->mgmt_mem_pool.chunk_size * WCN36XX_DXE_CH_DESC_NUMB_TX_H; in wcn36xx_dxe_allocate_mem_pools() 640 wcn->data_mem_pool.chunk_size = WCN36XX_BD_CHUNK_SIZE + in wcn36xx_dxe_allocate_mem_pools() 643 s = wcn->data_mem_pool.chunk_size * WCN36XX_DXE_CH_DESC_NUMB_TX_L; in wcn36xx_dxe_allocate_mem_pools() 663 dma_free_coherent(wcn->dev, wcn->mgmt_mem_pool.chunk_size * in wcn36xx_dxe_free_mem_pools() 669 dma_free_coherent(wcn->dev, wcn->data_mem_pool.chunk_size * in wcn36xx_dxe_free_mem_pools()
|
/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_device.c | 502 unsigned int chunk_size); 965 unsigned int chunk_size) in kfd_gtt_sa_init() argument 969 if (WARN_ON(buf_size < chunk_size)) in kfd_gtt_sa_init() 973 if (WARN_ON(chunk_size == 0)) in kfd_gtt_sa_init() 976 kfd->gtt_sa_chunk_size = chunk_size; in kfd_gtt_sa_init() 977 kfd->gtt_sa_num_of_chunks = buf_size / chunk_size; in kfd_gtt_sa_init() 1004 unsigned int chunk_size) in kfd_gtt_sa_calc_gpu_addr() argument 1006 return start_addr + bit_num * chunk_size; in kfd_gtt_sa_calc_gpu_addr() 1011 unsigned int chunk_size) in kfd_gtt_sa_calc_cpu_addr() argument 1013 return (uint32_t *) ((uint64_t) start_addr + bit_num * chunk_size); in kfd_gtt_sa_calc_cpu_addr()
|
/drivers/rpmsg/ |
D | qcom_glink_native.c | 792 __le32 chunk_size; in qcom_glink_rx_data() member 795 unsigned int chunk_size; in qcom_glink_rx_data() local 808 chunk_size = le32_to_cpu(hdr.chunk_size); in qcom_glink_rx_data() 811 if (avail < sizeof(hdr) + chunk_size) { in qcom_glink_rx_data() 834 intent->data = kmalloc(chunk_size + left_size, in qcom_glink_rx_data() 842 intent->size = chunk_size + left_size; in qcom_glink_rx_data() 864 if (intent->size - intent->offset < chunk_size) { in qcom_glink_rx_data() 872 sizeof(hdr), chunk_size); in qcom_glink_rx_data() 873 intent->offset += chunk_size; in qcom_glink_rx_data() 894 qcom_glink_rx_advance(glink, ALIGN(sizeof(hdr) + chunk_size, 8)); in qcom_glink_rx_data() [all …]
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_fifo.c | 411 uint32_t chunk_size = max - next_cmd; in vmw_fifo_res_copy() local 416 if (bytes < chunk_size) in vmw_fifo_res_copy() 417 chunk_size = bytes; in vmw_fifo_res_copy() 421 memcpy(fifo_mem + (next_cmd >> 2), buffer, chunk_size); in vmw_fifo_res_copy() 422 rest = bytes - chunk_size; in vmw_fifo_res_copy() 424 memcpy(fifo_mem + (min >> 2), buffer + (chunk_size >> 2), rest); in vmw_fifo_res_copy()
|
/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/ |
D | setup.c | 18 if (xsk->chunk_size > PAGE_SIZE || in mlx5e_validate_xsk_param() 19 xsk->chunk_size < MLX5E_MIN_XSK_CHUNK_SIZE) in mlx5e_validate_xsk_param() 23 if (mlx5e_rx_get_min_frag_sz(params, xsk) > xsk->chunk_size) in mlx5e_validate_xsk_param()
|
/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_types.h | 159 enum mlx5dr_icm_chunk_size chunk_size; member 196 enum mlx5dr_icm_chunk_size chunk_size, 820 mlx5dr_icm_pool_chunk_size_to_entries(enum mlx5dr_icm_chunk_size chunk_size) in mlx5dr_icm_pool_chunk_size_to_entries() argument 822 return 1 << chunk_size; in mlx5dr_icm_pool_chunk_size_to_entries() 826 mlx5dr_icm_pool_chunk_size_to_byte(enum mlx5dr_icm_chunk_size chunk_size, in mlx5dr_icm_pool_chunk_size_to_byte() argument 837 num_of_entries = mlx5dr_icm_pool_chunk_size_to_entries(chunk_size); in mlx5dr_icm_pool_chunk_size_to_byte() 950 enum mlx5dr_icm_chunk_size chunk_size);
|
D | dr_icm_pool.c | 298 enum mlx5dr_icm_chunk_size chunk_size) in dr_icm_bucket_init() argument 305 bucket->num_of_entries = mlx5dr_icm_pool_chunk_size_to_entries(chunk_size); in dr_icm_bucket_init() 450 enum mlx5dr_icm_chunk_size chunk_size) in mlx5dr_icm_alloc_chunk() argument 457 if (chunk_size > pool->max_log_chunk_sz) in mlx5dr_icm_alloc_chunk() 460 bucket = &pool->buckets[chunk_size]; in mlx5dr_icm_alloc_chunk()
|
/drivers/net/ethernet/netronome/nfp/nfpcore/ |
D | nfp_nsp.c | 505 size_t chunk_size, dma_size; in nfp_nsp_command_buf_dma_sg() local 512 chunk_size = BIT_ULL(chunk_order); in nfp_nsp_command_buf_dma_sg() 514 nseg = DIV_ROUND_UP(max_size, chunk_size); in nfp_nsp_command_buf_dma_sg() 525 chunks[i].chunk = kmalloc(chunk_size, in nfp_nsp_command_buf_dma_sg() 530 chunks[i].len = min_t(u64, chunk_size, max_size - off); in nfp_nsp_command_buf_dma_sg() 534 coff = min_t(u64, arg->in_size - off, chunk_size); in nfp_nsp_command_buf_dma_sg() 537 memset(chunks[i].chunk + coff, 0, chunk_size - coff); in nfp_nsp_command_buf_dma_sg()
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | icm.c | 421 unsigned chunk_size; in mlx4_init_icm_table() local 443 chunk_size = MLX4_TABLE_CHUNK_SIZE; in mlx4_init_icm_table() 445 chunk_size = PAGE_ALIGN(size - in mlx4_init_icm_table() 448 table->icm[i] = mlx4_alloc_icm(dev, chunk_size >> PAGE_SHIFT, in mlx4_init_icm_table()
|
/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | nvm.c | 211 int chunk_size, ret; in iwl_nvm_write_section() local 213 chunk_size = min(IWL_NVM_DEFAULT_CHUNK_SIZE, in iwl_nvm_write_section() 217 chunk_size, data + offset); in iwl_nvm_write_section() 221 offset += chunk_size; in iwl_nvm_write_section()
|
/drivers/gpu/drm/amd/display/dc/dcn21/ |
D | dcn21_hubp.c | 130 CHUNK_SIZE, rq_regs->rq_regs_l.chunk_size, in hubp21_program_requestor() 139 CHUNK_SIZE_C, rq_regs->rq_regs_c.chunk_size, in hubp21_program_requestor()
|
/drivers/staging/uwb/i1480/dfu/ |
D | mac.c | 158 size_t chunk_size; in i1480_fw_cmp() local 162 chunk_size = size < i1480->buf_size ? size : i1480->buf_size; in i1480_fw_cmp() 163 result = i1480->read(i1480, hdr->address + src_itr, chunk_size); in i1480_fw_cmp()
|