/linux-6.12.1/tools/testing/selftests/mm/ |
D | mlock-random-test.c | 132 static void test_mlock_within_limit(char *p, int alloc_size) in test_mlock_within_limit() argument 141 if (cur.rlim_cur < alloc_size) in test_mlock_within_limit() 143 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_within_limit() 154 int lock_size = rand() % alloc_size; in test_mlock_within_limit() 155 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit() 166 p, alloc_size, in test_mlock_within_limit() 176 if (locked_vm_size > PAGE_ALIGN(alloc_size, page_size) + page_size) in test_mlock_within_limit() 178 __func__, locked_vm_size, alloc_size); in test_mlock_within_limit() 199 static void test_mlock_outof_limit(char *p, int alloc_size) in test_mlock_outof_limit() argument 207 if (cur.rlim_cur >= alloc_size) in test_mlock_outof_limit() [all …]
|
D | droppable.c | 20 size_t alloc_size = 134217728; in main() local 28 alloc = mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_DROPPABLE, -1, 0); in main() 30 memset(alloc, 'A', alloc_size); in main() 31 for (size_t i = 0; i < alloc_size; i += page_size) in main() 42 for (size_t i = 0; i < alloc_size; i += page_size) { in main()
|
/linux-6.12.1/drivers/firmware/efi/libstub/ |
D | zboot.c | 40 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 68 unsigned long image_base, alloc_size; in efi_zboot_entry() local 93 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); in efi_zboot_entry() 143 efi_free(alloc_size, image_base); in efi_zboot_entry()
|
D | file.c | 198 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() 270 memcpy((void *)alloc_addr, (void *)old_addr, alloc_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() [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 | 87 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.12.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-6.12.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-6.12.1/kernel/dma/ |
D | swiotlb.c | 77 size_t alloc_size; member 292 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_pool() 360 size_t alloc_size; in swiotlb_init_remap() local 398 alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs)); in swiotlb_init_remap() 399 mem->slots = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_remap() 402 __func__, alloc_size, PAGE_SIZE); in swiotlb_init_remap() 864 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce() local 886 alloc_size -= tlb_offset; in swiotlb_bounce() 888 if (size > alloc_size) { in swiotlb_bounce() 891 alloc_size, size); in swiotlb_bounce() [all …]
|
/linux-6.12.1/lib/ |
D | fortify_kunit.c | 202 #define TEST_kmalloc(checker, expected_size, alloc_size) do { \ argument 207 checker(expected_size, kmalloc(alloc_size, gfp), \ 210 kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \ 212 checker(expected_size, kzalloc(alloc_size, gfp), \ 215 kzalloc_node(alloc_size, gfp, NUMA_NO_NODE), \ 217 checker(expected_size, kcalloc(1, alloc_size, gfp), \ 219 checker(expected_size, kcalloc(alloc_size, 1, gfp), \ 222 kcalloc_node(1, alloc_size, gfp, NUMA_NO_NODE), \ 225 kcalloc_node(alloc_size, 1, gfp, NUMA_NO_NODE), \ 227 checker(expected_size, kmalloc_array(1, alloc_size, gfp), \ [all …]
|
D | scatterlist.c | 208 unsigned int alloc_size = num_ents; in __sg_free_table() local 217 if (alloc_size > curr_max_ents) { in __sg_free_table() 219 alloc_size = curr_max_ents; in __sg_free_table() 220 sg_size = alloc_size - 1; in __sg_free_table() 222 sg_size = alloc_size; in __sg_free_table() 230 free_fn(sgl, alloc_size); in __sg_free_table() 308 unsigned int sg_size, alloc_size = left; in __sg_alloc_table() local 310 if (alloc_size > curr_max_ents) { in __sg_alloc_table() 311 alloc_size = curr_max_ents; in __sg_alloc_table() 312 sg_size = alloc_size - 1; in __sg_alloc_table() [all …]
|
/linux-6.12.1/fs/ocfs2/ |
D | move_extents.c | 731 static void ocfs2_calc_extent_defrag_len(u32 *alloc_size, u32 *len_defraged, in ocfs2_calc_extent_defrag_len() argument 734 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() 762 u32 cpos, phys_cpos, move_start, len_to_move, alloc_size; in __ocfs2_move_extents_range() local 819 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &alloc_size, in __ocfs2_move_extents_range() 826 if (alloc_size > len_to_move) in __ocfs2_move_extents_range() 827 alloc_size = len_to_move; in __ocfs2_move_extents_range() 843 ocfs2_calc_extent_defrag_len(&alloc_size, &len_defraged, in __ocfs2_move_extents_range() 855 cpos, phys_cpos, alloc_size, len_defraged); in __ocfs2_move_extents_range() [all …]
|
/linux-6.12.1/tools/testing/selftests/rseq/ |
D | rseq.c | 112 unsigned int alloc_size = rseq_size; in get_rseq_min_alloc_size() local 114 if (alloc_size < ORIG_RSEQ_ALLOC_SIZE) in get_rseq_min_alloc_size() 115 alloc_size = ORIG_RSEQ_ALLOC_SIZE; in get_rseq_min_alloc_size() 116 return alloc_size; in get_rseq_min_alloc_size()
|
/linux-6.12.1/mm/ |
D | percpu.c | 1351 size_t alloc_size; in pcpu_alloc_first_chunk() local 1360 alloc_size = struct_size(chunk, populated, in pcpu_alloc_first_chunk() 1362 chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1365 alloc_size); in pcpu_alloc_first_chunk() 1376 alloc_size = BITS_TO_LONGS(region_bits) * sizeof(chunk->alloc_map[0]); in pcpu_alloc_first_chunk() 1377 chunk->alloc_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1380 alloc_size); in pcpu_alloc_first_chunk() 1382 alloc_size = in pcpu_alloc_first_chunk() 1384 chunk->bound_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk() 1387 alloc_size); in pcpu_alloc_first_chunk() [all …]
|
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/ |
D | mlx5hws_pool.c | 282 u32 alloc_size, int idx) in hws_pool_create_resource_on_index() argument 284 int ret = hws_pool_resource_alloc(pool, alloc_size, idx); in hws_pool_create_resource_on_index() 288 pool->type, alloc_size, idx); in hws_pool_create_resource_on_index() 299 u32 alloc_size; in hws_pool_element_create_new_elem() local 301 alloc_size = pool->alloc_log_sz; in hws_pool_element_create_new_elem() 311 elem->bitmap = hws_pool_create_and_init_bitmap(alloc_size - order); in hws_pool_element_create_new_elem() 315 pool->type, alloc_size, idx); in hws_pool_element_create_new_elem() 319 elem->log_size = alloc_size - order; in hws_pool_element_create_new_elem() 322 if (hws_pool_create_resource_on_index(pool, alloc_size, idx)) { in hws_pool_element_create_new_elem() 324 pool->type, alloc_size, idx); in hws_pool_element_create_new_elem()
|
/linux-6.12.1/fs/ntfs3/ |
D | attrib.c | 456 old_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size() 601 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size() 614 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size() 624 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size() 688 attr_b->nres.alloc_size = cpu_to_le64(old_size); in attr_set_size() 734 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size() 745 attr_b->nres.alloc_size; in attr_set_size() 749 attr_b->nres.alloc_size; in attr_set_size() 816 new_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size() 836 attr_b->nres.alloc_size = cpu_to_le64(old_alloc); in attr_set_size() [all …]
|
/linux-6.12.1/mm/kasan/ |
D | report.c | 306 } else if (access_addr >= object_addr + info->alloc_size) { in describe_object_addr() 308 rel_bytes = access_addr - (object_addr + info->alloc_size); in describe_object_addr() 330 rel_bytes, rel_type, region_state, info->alloc_size, in describe_object_addr() 331 (void *)object_addr, (void *)(object_addr + info->alloc_size)); in describe_object_addr() 512 info->alloc_size = kasan_get_alloc_size(info->object, info->cache); in complete_report_info() 514 if (!info->alloc_size) in complete_report_info() 515 info->alloc_size = info->cache->object_size; in complete_report_info()
|
/linux-6.12.1/drivers/md/ |
D | dm-stats.c | 84 static bool __check_shared_memory(size_t alloc_size) in __check_shared_memory() argument 88 a = shared_memory_amount + alloc_size; in __check_shared_memory() 100 static bool check_shared_memory(size_t alloc_size) in check_shared_memory() argument 106 ret = __check_shared_memory(alloc_size); in check_shared_memory() 113 static bool claim_shared_memory(size_t alloc_size) in claim_shared_memory() argument 117 if (!__check_shared_memory(alloc_size)) { in claim_shared_memory() 122 shared_memory_amount += alloc_size; in claim_shared_memory() 129 static void free_shared_memory(size_t alloc_size) in free_shared_memory() argument 135 if (WARN_ON_ONCE(shared_memory_amount < alloc_size)) { in free_shared_memory() 141 shared_memory_amount -= alloc_size; in free_shared_memory() [all …]
|
/linux-6.12.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()
|
D | sof-client-ipc-kernel-injector.c | 98 size_t alloc_size; in sof_msg_inject_probe() local 106 alloc_size = priv->max_msg_size; in sof_msg_inject_probe() 107 priv->kernel_buffer = devm_kmalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe()
|
/linux-6.12.1/net/openvswitch/ |
D | vport.c | 126 size_t alloc_size; in ovs_vport_alloc() local 129 alloc_size = sizeof(struct vport); in ovs_vport_alloc() 131 alloc_size = ALIGN(alloc_size, VPORT_ALIGN); in ovs_vport_alloc() 132 alloc_size += priv_size; in ovs_vport_alloc() 135 vport = kzalloc(alloc_size, GFP_KERNEL); in ovs_vport_alloc()
|
/linux-6.12.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-6.12.1/net/bluetooth/ |
D | coredump.c | 59 hdev->dump.alloc_size, state); in hci_devcd_update_state() 92 hdev->dump.alloc_size = 0; in hci_devcd_reset() 115 hdev->dump.alloc_size = size; in hci_devcd_alloc() 257 hdev->dump.alloc_size); in hci_devcd_handle_pkt_complete() 276 hdev->dump.alloc_size); in hci_devcd_handle_pkt_abort() 392 hdev->dump.alloc_size); in hci_devcd_timeout()
|
/linux-6.12.1/tools/testing/selftests/vDSO/ |
D | vdso_test_getrandom.c | 65 size_t alloc_size, num = sysconf(_SC_NPROCESSORS_ONLN); /* Just a decent heuristic. */ in vgetrandom_get_state() local 70 alloc_size = (num * state_size_aligned + page_size - 1) & (~(page_size - 1)); in vgetrandom_get_state() 71 num = (page_size / state_size_aligned) * (alloc_size / page_size); in vgetrandom_get_state() 72 new_block = mmap(0, alloc_size, vgrnd.params.mmap_prot, vgrnd.params.mmap_flags, -1, 0); in vgetrandom_get_state() 93 munmap(new_block, alloc_size); in vgetrandom_get_state()
|
/linux-6.12.1/drivers/cpufreq/ |
D | cpufreq_stats.c | 214 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()
|