Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 25 of 146) sorted by relevance

123456

/linux-6.3-rc2/lib/
A Dfortify_kunit.c154 kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
159 kzalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
187 orig = kmalloc(alloc_size, gfp); \
190 krealloc(orig, (alloc_size) * 2, gfp), \
192 orig = kmalloc(alloc_size, gfp); \
197 orig = kmalloc(alloc_size, gfp); \
281 devm_kmalloc_array(dev, 1, alloc_size, gfp), \
284 devm_kmalloc_array(dev, alloc_size, 1, gfp), \
287 devm_kcalloc(dev, 1, alloc_size, gfp), \
290 devm_kcalloc(dev, alloc_size, 1, gfp), \
[all …]
A Dscatterlist.c214 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()
307 alloc_size = curr_max_ents; in __sg_alloc_table()
308 sg_size = alloc_size - 1; in __sg_alloc_table()
310 sg_size = alloc_size; in __sg_alloc_table()
333 sg_init_table(sg, alloc_size); in __sg_alloc_table()
389 unsigned int alloc_size; in get_next_sg() local
[all …]
/linux-6.3-rc2/tools/testing/selftests/mm/
A Dmlock-random-test.c138 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()
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()
225 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_outof_limit()
[all …]
/linux-6.3-rc2/drivers/firmware/efi/libstub/
A Dzboot.c40 static unsigned long alloc_preferred_address(unsigned long alloc_size) in alloc_preferred_address() argument
46 alloc_size / EFI_PAGE_SIZE, &efi_addr) == EFI_SUCCESS) in alloc_preferred_address()
53 unsigned long alloc_size, in efi_cache_sync_image() argument
64 unsigned long image_base, alloc_size, code_size; in efi_zboot_entry() local
89 alloc_size = round_up(get_unaligned_le32(_gzdata_end - 4), in efi_zboot_entry()
98 image_base = alloc_preferred_address(alloc_size); in efi_zboot_entry()
121 status = efi_random_alloc(alloc_size, min_kimg_align, &image_base, in efi_zboot_entry()
131 (void *)image_base, alloc_size, NULL, error); in efi_zboot_entry()
138 efi_cache_sync_image(image_base, alloc_size, code_size); in efi_zboot_entry()
140 efi_remap_image(image_base, alloc_size, code_size); in efi_zboot_entry()
[all …]
A Dfile.c198 unsigned long alloc_size; in handle_cmdline_files() local
211 alloc_addr = alloc_size = 0; in handle_cmdline_files()
245 if (round_up(alloc_size + size, EFI_ALLOC_ALIGN) > in handle_cmdline_files()
246 round_up(alloc_size, EFI_ALLOC_ALIGN)) { in handle_cmdline_files()
251 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
255 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
271 efi_free(alloc_size, old_addr); in handle_cmdline_files()
275 addr = (void *)alloc_addr + alloc_size; in handle_cmdline_files()
276 alloc_size += size; in handle_cmdline_files()
294 *load_size = alloc_size; in handle_cmdline_files()
[all …]
A Drelocate.c112 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()
A Darm32-stub.c87 int alloc_size = MAX_UNCOMP_KERNEL_SIZE + EFI_PHYS_ALIGN; in handle_kernel_image() local
97 status = efi_low_alloc_above(alloc_size, EFI_PAGE_SIZE, &alloc_base, 0x0); in handle_kernel_image()
122 alloc_size -= *reserve_addr - alloc_base; in handle_kernel_image()
125 (alloc_size - MAX_UNCOMP_KERNEL_SIZE) / EFI_PAGE_SIZE); in handle_kernel_image()
/linux-6.3-rc2/kernel/dma/
A Dswiotlb.c67 size_t alloc_size; member
280 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_mem()
336 size_t alloc_size; in swiotlb_init_remap() local
525 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce() local
543 if (tlb_offset > alloc_size) { in swiotlb_bounce()
551 alloc_size -= tlb_offset; in swiotlb_bounce()
553 if (size > alloc_size) { in swiotlb_bounce()
556 alloc_size, size); in swiotlb_bounce()
557 size = alloc_size; in swiotlb_bounce()
643 if (alloc_size >= PAGE_SIZE) in swiotlb_do_find_slots()
[all …]
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlxsw/
A Dspectrum1_kvdl.c35 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()
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()
286 info->alloc_size; in mlxsw_sp1_kvdl_part_occ()
[all …]
/linux-6.3-rc2/tools/testing/selftests/powerpc/stringloops/
A Dmemcmp.c76 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-6.3-rc2/fs/ocfs2/
A Dmove_extents.c734 if ((*alloc_size + *len_defraged) < threshold) { in ocfs2_calc_extent_defrag_len()
738 *len_defraged += *alloc_size; in ocfs2_calc_extent_defrag_len()
753 *alloc_size = threshold - *len_defraged; in ocfs2_calc_extent_defrag_len()
826 if (alloc_size > len_to_move) in __ocfs2_move_extents_range()
827 alloc_size = len_to_move; in __ocfs2_move_extents_range()
858 &alloc_size, flags); in __ocfs2_move_extents_range()
861 &new_phys_cpos, alloc_size, in __ocfs2_move_extents_range()
864 new_phys_cpos += alloc_size; in __ocfs2_move_extents_range()
872 context->clusters_moved += alloc_size; in __ocfs2_move_extents_range()
874 cpos += alloc_size; in __ocfs2_move_extents_range()
[all …]
/linux-6.3-rc2/mm/
A Dpercpu.c1351 size_t alloc_size; in pcpu_alloc_first_chunk() local
1365 alloc_size); in pcpu_alloc_first_chunk()
1380 alloc_size); in pcpu_alloc_first_chunk()
1382 alloc_size = in pcpu_alloc_first_chunk()
1387 alloc_size); in pcpu_alloc_first_chunk()
1393 alloc_size); in pcpu_alloc_first_chunk()
2593 size_t alloc_size; in pcpu_setup_first_chunk() local
2629 alloc_size); in pcpu_setup_first_chunk()
2882 while (alloc_size % upa || (offset_in_page(alloc_size / upa))) in pcpu_build_alloc_info()
2918 if (alloc_size % upa || (offset_in_page(alloc_size / upa))) in pcpu_build_alloc_info()
[all …]
/linux-6.3-rc2/fs/ntfs3/
A Dattrib.c1867 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_collapse_range()
1874 total_size = alloc_size; in attr_collapse_range()
2069 attr_b->nres.alloc_size = cpu_to_le64(alloc_size - bytes); in attr_collapse_range()
2135 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_punch_hole()
2138 if (vbo >= alloc_size) { in attr_punch_hole()
2146 if (bytes > alloc_size) in attr_punch_hole()
2147 bytes = alloc_size; in attr_punch_hole()
2343 alloc_size = data_size; in attr_insert_range()
2347 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
2400 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
[all …]
/linux-6.3-rc2/mm/kasan/
A Dreport.c248 } else if (access_addr >= object_addr + info->alloc_size) { in describe_object_addr()
250 rel_bytes = access_addr - (object_addr + info->alloc_size); in describe_object_addr()
272 rel_bytes, rel_type, region_state, info->alloc_size, in describe_object_addr()
273 (void *)object_addr, (void *)(object_addr + info->alloc_size)); in describe_object_addr()
454 info->alloc_size = kasan_get_alloc_size(info->object, info->cache); in complete_report_info()
456 if (!info->alloc_size) in complete_report_info()
457 info->alloc_size = info->cache->object_size; in complete_report_info()
/linux-6.3-rc2/net/openvswitch/
A Dvport.c126 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-6.3-rc2/drivers/md/
A Ddm-stats.c85 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
138 shared_memory_amount -= alloc_size; in free_shared_memory()
147 if (!claim_shared_memory(alloc_size)) in dm_kvzalloc()
154 free_shared_memory(alloc_size); in dm_kvzalloc()
[all …]
/linux-6.3-rc2/sound/soc/sof/
A Dsof-client-ipc-msg-injector.c259 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-6.3-rc2/drivers/gpu/drm/vmwgfx/
A Dvmwgfx_simple_resource.c147 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-6.3-rc2/drivers/cpufreq/
A Dcpufreq_stats.c214 unsigned int alloc_size; in cpufreq_stats_create_table() local
229 alloc_size = count * sizeof(int) + count * sizeof(u64); in cpufreq_stats_create_table()
231 alloc_size += count * count * sizeof(int); in cpufreq_stats_create_table()
234 stats->time_in_state = kzalloc(alloc_size, GFP_KERNEL); in cpufreq_stats_create_table()
/linux-6.3-rc2/tools/lib/api/fs/
A Dfs.c379 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-6.3-rc2/arch/powerpc/kernel/
A Deeh_pe.c50 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-6.3-rc2/drivers/gpu/drm/i915/gt/uc/
A Dintel_guc_ads.c509 u32 total_size = 0, alloc_size, real_size; in guc_prep_golden_context() local
544 alloc_size = PAGE_ALIGN(real_size); in guc_prep_golden_context()
545 total_size += alloc_size; in guc_prep_golden_context()
566 addr_ggtt += alloc_size; in guc_prep_golden_context()
599 u32 addr_ggtt, total_size = 0, alloc_size, real_size; in guc_init_golden_context() local
620 alloc_size = PAGE_ALIGN(real_size); in guc_init_golden_context()
621 total_size += alloc_size; in guc_init_golden_context()
636 addr_ggtt += alloc_size; in guc_init_golden_context()
640 offset += alloc_size; in guc_init_golden_context()
/linux-6.3-rc2/drivers/hid/bpf/
A Dhid_bpf_dispatch.c195 size_t alloc_size = 0; in __hid_bpf_allocate_data() local
215 alloc_size = DIV_ROUND_UP(max_report_len, 64) * 64; in __hid_bpf_allocate_data()
217 alloc_data = kzalloc(alloc_size, GFP_KERNEL); in __hid_bpf_allocate_data()
222 *size = alloc_size; in __hid_bpf_allocate_data()
/linux-6.3-rc2/drivers/i2c/busses/
A Di2c-cros-ec-tunnel.c182 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-6.3-rc2/drivers/mtd/parsers/
A Dcmdlinepart.c175 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()

Completed in 49 milliseconds

123456