/Linux-v6.1/tools/testing/selftests/vm/ |
D | mlock-random-test.c | 138 int test_mlock_within_limit(char *p, int alloc_size) in test_mlock_within_limit() argument 147 if (cur.rlim_cur < alloc_size) { in test_mlock_within_limit() 149 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_within_limit() 162 int lock_size = rand() % alloc_size; in test_mlock_within_limit() 163 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit() 174 p, alloc_size, in test_mlock_within_limit() 190 if (locked_vm_size > PAGE_ALIGN(alloc_size, page_size) + page_size) { in test_mlock_within_limit() 192 locked_vm_size, alloc_size); in test_mlock_within_limit() 215 int test_mlock_outof_limit(char *p, int alloc_size) in test_mlock_outof_limit() argument 223 if (cur.rlim_cur >= alloc_size) { in test_mlock_outof_limit() [all …]
|
/Linux-v6.1/drivers/firmware/efi/libstub/ |
D | file.c | 162 unsigned long alloc_size; in handle_cmdline_files() local 175 alloc_addr = alloc_size = 0; in handle_cmdline_files() 207 if (round_up(alloc_size + size, EFI_ALLOC_ALIGN) > in handle_cmdline_files() 208 round_up(alloc_size, EFI_ALLOC_ALIGN)) { in handle_cmdline_files() 213 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files() 217 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files() 232 memcpy((void *)alloc_addr, (void *)old_addr, alloc_size); in handle_cmdline_files() 233 efi_free(alloc_size, old_addr); in handle_cmdline_files() 237 addr = (void *)alloc_addr + alloc_size; in handle_cmdline_files() 238 alloc_size += size; in handle_cmdline_files() [all …]
|
D | relocate.c | 112 unsigned long alloc_size, in efi_relocate_kernel() argument 123 if (!image_addr || !image_size || !alloc_size) in efi_relocate_kernel() 125 if (alloc_size < image_size) in efi_relocate_kernel() 138 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel() 147 status = efi_low_alloc_above(alloc_size, alignment, &new_addr, in efi_relocate_kernel()
|
D | arm32-stub.c | 124 int alloc_size = MAX_UNCOMP_KERNEL_SIZE + EFI_PHYS_ALIGN; in handle_kernel_image() local 134 status = efi_low_alloc_above(alloc_size, EFI_PAGE_SIZE, &alloc_base, 0x0); in handle_kernel_image() 159 alloc_size -= *reserve_addr - alloc_base; in handle_kernel_image() 162 (alloc_size - MAX_UNCOMP_KERNEL_SIZE) / EFI_PAGE_SIZE); in handle_kernel_image()
|
/Linux-v6.1/kernel/dma/ |
D | swiotlb.c | 67 size_t alloc_size; member 288 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_mem() 312 size_t alloc_size; in swiotlb_init_remap() local 356 alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs)); in swiotlb_init_remap() 357 mem->slots = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_remap() 360 __func__, alloc_size, PAGE_SIZE); in swiotlb_init_remap() 517 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce() local 535 if (tlb_offset > alloc_size) { in swiotlb_bounce() 538 alloc_size, size, tlb_offset); in swiotlb_bounce() 543 alloc_size -= tlb_offset; in swiotlb_bounce() [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum1_kvdl.c | 35 unsigned int alloc_size; member 49 .alloc_size = MLXSW_SP1_KVDL_##id##_ALLOC_SIZE, \ 72 unsigned int alloc_size) in mlxsw_sp1_kvdl_alloc_size_part() argument 79 if (alloc_size <= part->info.alloc_size && in mlxsw_sp1_kvdl_alloc_size_part() 81 part->info.alloc_size <= min_part->info.alloc_size)) in mlxsw_sp1_kvdl_alloc_size_part() 108 return info->start_index + entry_index * info->alloc_size; in mlxsw_sp1_kvdl_to_kvdl_index() 115 return (kvdl_index - info->start_index) / info->alloc_size; in mlxsw_sp1_kvdl_to_entry_index() 125 info->alloc_size; in mlxsw_sp1_kvdl_part_alloc() 190 *p_alloc_size = part->info.alloc_size; in mlxsw_sp1_kvdl_alloc_size_query() 226 nr_entries = div_u64(resource_size, info->alloc_size); in mlxsw_sp1_kvdl_part_init() [all …]
|
/Linux-v6.1/lib/ |
D | scatterlist.c | 205 unsigned int alloc_size = num_ents; in __sg_free_table() local 214 if (alloc_size > curr_max_ents) { in __sg_free_table() 216 alloc_size = curr_max_ents; in __sg_free_table() 217 sg_size = alloc_size - 1; in __sg_free_table() 219 sg_size = alloc_size; in __sg_free_table() 227 free_fn(sgl, alloc_size); in __sg_free_table() 304 unsigned int sg_size, alloc_size = left; in __sg_alloc_table() local 306 if (alloc_size > curr_max_ents) { in __sg_alloc_table() 307 alloc_size = curr_max_ents; in __sg_alloc_table() 308 sg_size = alloc_size - 1; in __sg_alloc_table() [all …]
|
/Linux-v6.1/tools/testing/selftests/powerpc/stringloops/ |
D | memcmp.c | 76 unsigned long i, comp_size, alloc_size; in testcase() local 81 alloc_size = comp_size + MAX_OFFSET_DIFF_S1_S2; in testcase() 89 s1 = p + MAP_SIZE - alloc_size; in testcase() 90 s2 = p + 3 * MAP_SIZE - alloc_size; in testcase() 104 for (j = 0; j < alloc_size; j++) in testcase() 130 for (j = 0; j < alloc_size; j++) in testcase()
|
/Linux-v6.1/fs/ocfs2/ |
D | move_extents.c | 740 static void ocfs2_calc_extent_defrag_len(u32 *alloc_size, u32 *len_defraged, in ocfs2_calc_extent_defrag_len() argument 743 if ((*alloc_size + *len_defraged) < threshold) { in ocfs2_calc_extent_defrag_len() 747 *len_defraged += *alloc_size; in ocfs2_calc_extent_defrag_len() 762 *alloc_size = threshold - *len_defraged; in ocfs2_calc_extent_defrag_len() 771 u32 cpos, phys_cpos, move_start, len_to_move, alloc_size; in __ocfs2_move_extents_range() local 828 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &alloc_size, in __ocfs2_move_extents_range() 835 if (alloc_size > len_to_move) in __ocfs2_move_extents_range() 836 alloc_size = len_to_move; in __ocfs2_move_extents_range() 852 ocfs2_calc_extent_defrag_len(&alloc_size, &len_defraged, in __ocfs2_move_extents_range() 864 cpos, phys_cpos, alloc_size, len_defraged); in __ocfs2_move_extents_range() [all …]
|
/Linux-v6.1/mm/ |
D | percpu.c | 1347 size_t alloc_size; in pcpu_alloc_first_chunk() local 1363 alloc_size = struct_size(chunk, populated, in pcpu_alloc_first_chunk() 1365 chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1368 alloc_size); in pcpu_alloc_first_chunk() 1379 alloc_size = BITS_TO_LONGS(region_bits) * sizeof(chunk->alloc_map[0]); in pcpu_alloc_first_chunk() 1380 chunk->alloc_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1383 alloc_size); in pcpu_alloc_first_chunk() 1385 alloc_size = in pcpu_alloc_first_chunk() 1387 chunk->bound_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1390 alloc_size); in pcpu_alloc_first_chunk() [all …]
|
/Linux-v6.1/fs/ntfs3/ |
D | attrib.c | 457 old_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size() 603 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size() 616 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size() 626 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size() 689 attr_b->nres.alloc_size = cpu_to_le64(old_size); in attr_set_size() 735 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size() 746 attr_b->nres.alloc_size; in attr_set_size() 750 attr_b->nres.alloc_size; in attr_set_size() 824 new_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size() 843 attr_b->nres.alloc_size = cpu_to_le64(old_alloc); in attr_set_size() [all …]
|
/Linux-v6.1/net/openvswitch/ |
D | vport.c | 126 size_t alloc_size; in ovs_vport_alloc() local 128 alloc_size = sizeof(struct vport); in ovs_vport_alloc() 130 alloc_size = ALIGN(alloc_size, VPORT_ALIGN); in ovs_vport_alloc() 131 alloc_size += priv_size; in ovs_vport_alloc() 134 vport = kzalloc(alloc_size, GFP_KERNEL); in ovs_vport_alloc()
|
/Linux-v6.1/drivers/md/ |
D | dm-stats.c | 81 static bool __check_shared_memory(size_t alloc_size) in __check_shared_memory() argument 85 a = shared_memory_amount + alloc_size; in __check_shared_memory() 97 static bool check_shared_memory(size_t alloc_size) in check_shared_memory() argument 103 ret = __check_shared_memory(alloc_size); in check_shared_memory() 110 static bool claim_shared_memory(size_t alloc_size) in claim_shared_memory() argument 114 if (!__check_shared_memory(alloc_size)) { in claim_shared_memory() 119 shared_memory_amount += alloc_size; in claim_shared_memory() 126 static void free_shared_memory(size_t alloc_size) in free_shared_memory() argument 132 if (WARN_ON_ONCE(shared_memory_amount < alloc_size)) { in free_shared_memory() 138 shared_memory_amount -= alloc_size; in free_shared_memory() [all …]
|
/Linux-v6.1/sound/soc/sof/ |
D | sof-client-ipc-msg-injector.c | 259 size_t alloc_size; in sof_msg_inject_probe() local 268 alloc_size = priv->max_msg_size; in sof_msg_inject_probe() 271 alloc_size += sizeof(struct sof_ipc4_msg); in sof_msg_inject_probe() 273 priv->tx_buffer = devm_kmalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe() 274 priv->rx_buffer = devm_kzalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe()
|
/Linux-v6.1/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_simple_resource.c | 147 size_t alloc_size; in vmw_simple_resource_create_ioctl() local 150 alloc_size = offsetof(struct vmw_user_simple_resource, simple) + in vmw_simple_resource_create_ioctl() 153 usimple = kzalloc(alloc_size, GFP_KERNEL); in vmw_simple_resource_create_ioctl()
|
/Linux-v6.1/tools/lib/api/fs/ |
D | fs.c | 379 size_t size = 0, alloc_size = 0; in filename__read_str() local 389 if (size == alloc_size) { in filename__read_str() 390 alloc_size += BUFSIZ; in filename__read_str() 391 nbf = realloc(bf, alloc_size); in filename__read_str() 400 n = read(fd, bf + size, alloc_size - size); in filename__read_str()
|
/Linux-v6.1/drivers/cpufreq/ |
D | cpufreq_stats.c | 216 unsigned int alloc_size; in cpufreq_stats_create_table() local 231 alloc_size = count * sizeof(int) + count * sizeof(u64); in cpufreq_stats_create_table() 233 alloc_size += count * count * sizeof(int); in cpufreq_stats_create_table() 236 stats->time_in_state = kzalloc(alloc_size, GFP_KERNEL); in cpufreq_stats_create_table()
|
/Linux-v6.1/arch/powerpc/kernel/ |
D | eeh_pe.c | 50 size_t alloc_size; in eeh_pe_alloc() local 52 alloc_size = sizeof(struct eeh_pe); in eeh_pe_alloc() 54 alloc_size = ALIGN(alloc_size, cache_line_size()); in eeh_pe_alloc() 55 alloc_size += eeh_pe_aux_size; in eeh_pe_alloc() 59 pe = kzalloc(alloc_size, GFP_KERNEL); in eeh_pe_alloc()
|
/Linux-v6.1/drivers/gpu/drm/i915/gt/uc/ |
D | intel_guc_ads.c | 476 u32 total_size = 0, alloc_size, real_size; in guc_prep_golden_context() local 514 alloc_size = PAGE_ALIGN(real_size); in guc_prep_golden_context() 515 total_size += alloc_size; in guc_prep_golden_context() 536 addr_ggtt += alloc_size; in guc_prep_golden_context() 569 u32 addr_ggtt, total_size = 0, alloc_size, real_size; in guc_init_golden_context() local 593 alloc_size = PAGE_ALIGN(real_size); in guc_init_golden_context() 594 total_size += alloc_size; in guc_init_golden_context() 609 addr_ggtt += alloc_size; in guc_init_golden_context() 613 offset += alloc_size; in guc_init_golden_context()
|
/Linux-v6.1/drivers/mtd/parsers/ |
D | cmdlinepart.c | 175 int alloc_size; in newpart() local 178 alloc_size = *num_parts * sizeof(struct mtd_partition) + in newpart() 181 parts = kzalloc(alloc_size, GFP_KERNEL); in newpart()
|
/Linux-v6.1/drivers/i2c/busses/ |
D | i2c-cros-ec-tunnel.c | 182 int alloc_size; in ec_i2c_xfer() local 199 alloc_size = max(request_len, response_len); in ec_i2c_xfer() 200 msg = kmalloc(sizeof(*msg) + alloc_size, GFP_KERNEL); in ec_i2c_xfer()
|
/Linux-v6.1/drivers/usb/host/ |
D | ehci-dbg.c | 339 size_t alloc_size; member 482 size = buf->alloc_size; in fill_async_buffer() 524 size = buf->alloc_size; in fill_bandwidth_buffer() 640 size = buf->alloc_size; in fill_periodic_buffer() 736 return buf->alloc_size - size; in fill_periodic_buffer() 768 size = buf->alloc_size; in fill_registers_buffer() 912 return buf->alloc_size - size; in fill_registers_buffer() 926 buf->alloc_size = PAGE_SIZE; in alloc_buffer() 937 buf->output_buf = vmalloc(buf->alloc_size); in fill_buffer() 1013 buf->alloc_size = (sizeof(void *) == 4 ? 6 : 8) * PAGE_SIZE; in debug_periodic_open()
|
/Linux-v6.1/drivers/iio/adc/ |
D | adi-axi-adc.c | 171 size_t alloc_size; in adi_axi_adc_conv_register() local 173 alloc_size = ALIGN(sizeof(struct adi_axi_adc_client), IIO_DMA_MINALIGN); in adi_axi_adc_conv_register() 175 alloc_size += ALIGN(sizeof_priv, IIO_DMA_MINALIGN); in adi_axi_adc_conv_register() 177 cl = kzalloc(alloc_size, GFP_KERNEL); in adi_axi_adc_conv_register()
|
/Linux-v6.1/net/ieee802154/ |
D | core.c | 101 size_t alloc_size; in wpan_phy_new() local 103 alloc_size = sizeof(*rdev) + priv_size; in wpan_phy_new() 104 rdev = kzalloc(alloc_size, GFP_KERNEL); in wpan_phy_new()
|
/Linux-v6.1/drivers/dca/ |
D | dca-core.c | 312 int alloc_size; in alloc_dca_provider() local 314 alloc_size = (sizeof(*dca) + priv_size); in alloc_dca_provider() 315 dca = kzalloc(alloc_size, GFP_KERNEL); in alloc_dca_provider()
|