Home
last modified time | relevance | path

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

1234567

/OK3568_Linux_fs/kernel/tools/testing/selftests/vm/
H 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()
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 …]
/OK3568_Linux_fs/kernel/drivers/firmware/efi/libstub/
H A Dfile.c144 unsigned long alloc_size; in handle_cmdline_files() local
157 alloc_addr = alloc_size = 0; in handle_cmdline_files()
189 if (round_up(alloc_size + size, EFI_ALLOC_ALIGN) > in handle_cmdline_files()
190 round_up(alloc_size, EFI_ALLOC_ALIGN)) { in handle_cmdline_files()
195 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
199 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
214 memcpy((void *)alloc_addr, (void *)old_addr, alloc_size); in handle_cmdline_files()
215 efi_free(alloc_size, old_addr); in handle_cmdline_files()
219 addr = (void *)alloc_addr + alloc_size; in handle_cmdline_files()
220 alloc_size += size; in handle_cmdline_files()
[all …]
H A Drelocate.c121 unsigned long alloc_size, in efi_relocate_kernel() argument
132 if (!image_addr || !image_size || !alloc_size) in efi_relocate_kernel()
134 if (alloc_size < image_size) in efi_relocate_kernel()
147 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel()
156 status = efi_low_alloc_above(alloc_size, alignment, &new_addr, in efi_relocate_kernel()
H A Darm32-stub.c123 int alloc_size = MAX_UNCOMP_KERNEL_SIZE + EFI_PHYS_ALIGN; in handle_kernel_image() local
133 status = efi_low_alloc_above(alloc_size, EFI_PAGE_SIZE, &alloc_base, 0x0); in handle_kernel_image()
158 alloc_size -= *reserve_addr - alloc_base; in handle_kernel_image()
161 (alloc_size - MAX_UNCOMP_KERNEL_SIZE) / EFI_PAGE_SIZE); in handle_kernel_image()
/OK3568_Linux_fs/kernel/kernel/dma/
H A Dswiotlb.c209 size_t alloc_size; in swiotlb_init_with_tbl() local
222 alloc_size = PAGE_ALIGN(io_tlb_nslabs * sizeof(int)); in swiotlb_init_with_tbl()
223 io_tlb_list = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_with_tbl()
226 __func__, alloc_size, PAGE_SIZE); in swiotlb_init_with_tbl()
228 alloc_size = PAGE_ALIGN(io_tlb_nslabs * sizeof(phys_addr_t)); in swiotlb_init_with_tbl()
229 io_tlb_orig_addr = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_with_tbl()
232 __func__, alloc_size, PAGE_SIZE); in swiotlb_init_with_tbl()
490 size_t alloc_size) in find_slots() argument
498 unsigned int nslots = nr_slots(alloc_size), stride; in find_slots()
510 if (alloc_size >= PAGE_SIZE) in find_slots()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlxsw/
H 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()
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()
227 nr_entries = div_u64(resource_size, info->alloc_size); in mlxsw_sp1_kvdl_part_init()
[all …]
/OK3568_Linux_fs/kernel/lib/
H A Dscatterlist.c203 unsigned int alloc_size = table->orig_nents; in __sg_free_table() local
212 if (alloc_size > curr_max_ents) { in __sg_free_table()
214 alloc_size = curr_max_ents; in __sg_free_table()
215 sg_size = alloc_size - 1; in __sg_free_table()
217 sg_size = alloc_size; in __sg_free_table()
225 free_fn(sgl, alloc_size); in __sg_free_table()
288 unsigned int sg_size, alloc_size = left; in __sg_alloc_table() local
290 if (alloc_size > curr_max_ents) { in __sg_alloc_table()
291 alloc_size = curr_max_ents; in __sg_alloc_table()
292 sg_size = alloc_size - 1; in __sg_alloc_table()
[all …]
/OK3568_Linux_fs/kernel/tools/testing/selftests/powerpc/stringloops/
H 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()
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/
H A Ddhd_linux_lb.c351 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_init() local
368 dhd->napi_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
379 dhd->rxc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
390 dhd->txc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
399 dhd->cpu_online_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
408 dhd->cpu_offline_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
417 dhd->txp_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
426 dhd->tx_start_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
436 dhd->napi_rx_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
448 dhd->txc_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
[all …]
/OK3568_Linux_fs/external/rkwifibt/drivers/infineon/
H A Ddhd_linux_lb.c343 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_init() local
360 dhd->napi_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
371 dhd->rxc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
382 dhd->txc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
391 dhd->cpu_online_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
400 dhd->cpu_offline_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
409 dhd->txp_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
418 dhd->tx_start_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
428 dhd->napi_rx_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
440 dhd->txc_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/infineon/bcmdhd/
H A Ddhd_linux_lb.c351 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_init() local
368 dhd->napi_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
379 dhd->rxc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
390 dhd->txc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
399 dhd->cpu_online_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
408 dhd->cpu_offline_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
417 dhd->txp_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
426 dhd->tx_start_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
436 dhd->napi_rx_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
448 dhd->txc_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
[all …]
/OK3568_Linux_fs/kernel/mm/
H A Dpercpu.c1302 size_t alloc_size; in pcpu_alloc_first_chunk() local
1318 alloc_size = struct_size(chunk, populated, in pcpu_alloc_first_chunk()
1320 chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk()
1323 alloc_size); in pcpu_alloc_first_chunk()
1334 alloc_size = BITS_TO_LONGS(region_bits) * sizeof(chunk->alloc_map[0]); in pcpu_alloc_first_chunk()
1335 chunk->alloc_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk()
1338 alloc_size); in pcpu_alloc_first_chunk()
1340 alloc_size = in pcpu_alloc_first_chunk()
1342 chunk->bound_map = memblock_alloc(alloc_size, SMP_CACHE_BYTES); in pcpu_alloc_first_chunk()
1345 alloc_size); in pcpu_alloc_first_chunk()
[all …]
/OK3568_Linux_fs/kernel/fs/ocfs2/
H A Dmove_extents.c742 static void ocfs2_calc_extent_defrag_len(u32 *alloc_size, u32 *len_defraged, in ocfs2_calc_extent_defrag_len() argument
745 if ((*alloc_size + *len_defraged) < threshold) { in ocfs2_calc_extent_defrag_len()
749 *len_defraged += *alloc_size; in ocfs2_calc_extent_defrag_len()
764 *alloc_size = threshold - *len_defraged; in ocfs2_calc_extent_defrag_len()
773 u32 cpos, phys_cpos, move_start, len_to_move, alloc_size; in __ocfs2_move_extents_range() local
830 ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &alloc_size, in __ocfs2_move_extents_range()
837 if (alloc_size > len_to_move) in __ocfs2_move_extents_range()
838 alloc_size = len_to_move; in __ocfs2_move_extents_range()
854 ocfs2_calc_extent_defrag_len(&alloc_size, &len_defraged, in __ocfs2_move_extents_range()
866 cpos, phys_cpos, alloc_size, len_defraged); in __ocfs2_move_extents_range()
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/csf/
H A Dmali_kbase_csf_cpu_queue_debugfs.c131 size_t alloc_size = buf_size; in kbase_csf_cpu_queue_dump() local
134 if (!buffer || !alloc_size) in kbase_csf_cpu_queue_dump()
137 alloc_size = (alloc_size + PAGE_SIZE) & ~(PAGE_SIZE - 1); in kbase_csf_cpu_queue_dump()
138 dump_buffer = kzalloc(alloc_size, GFP_KERNEL); in kbase_csf_cpu_queue_dump()
/OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/
H A Ddhd_linux_lb.c415 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_init() local
435 dhd->napi_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
446 dhd->rxc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
457 dhd->txc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
466 dhd->cpu_online_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
475 dhd->cpu_offline_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
484 dhd->txp_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
493 dhd->tx_start_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
503 dhd->napi_rx_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
526 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_deinit() local
[all …]
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/
H A Ddhd_linux_lb.c415 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_init() local
435 dhd->napi_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
446 dhd->rxc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
457 dhd->txc_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
466 dhd->cpu_online_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
475 dhd->cpu_offline_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
484 dhd->txp_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
493 dhd->tx_start_percpu_run_cnt = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
503 dhd->napi_rx_hist[j] = (uint32 *)MALLOC(dhdp->osh, alloc_size); in dhd_lb_stats_init()
526 int alloc_size = sizeof(uint32) * num_cpus; in dhd_lb_stats_deinit() local
[all …]
/OK3568_Linux_fs/kernel/net/openvswitch/
H A Dvport.c124 size_t alloc_size; in ovs_vport_alloc() local
126 alloc_size = sizeof(struct vport); in ovs_vport_alloc()
128 alloc_size = ALIGN(alloc_size, VPORT_ALIGN); in ovs_vport_alloc()
129 alloc_size += priv_size; in ovs_vport_alloc()
132 vport = kzalloc(alloc_size, GFP_KERNEL); in ovs_vport_alloc()
/OK3568_Linux_fs/kernel/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_simple_resource.c156 size_t alloc_size; in vmw_simple_resource_create_ioctl() local
160 alloc_size = offsetof(struct vmw_user_simple_resource, simple) + in vmw_simple_resource_create_ioctl()
162 account_size = ttm_round_pot(alloc_size) + VMW_IDA_ACC_SIZE + in vmw_simple_resource_create_ioctl()
180 usimple = kzalloc(alloc_size, GFP_KERNEL); in vmw_simple_resource_create_ioctl()
/OK3568_Linux_fs/kernel/drivers/md/
H A Ddm-stats.c81 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 …]
/OK3568_Linux_fs/kernel/tools/lib/api/fs/
H 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()
/OK3568_Linux_fs/kernel/drivers/cpufreq/
H A Dcpufreq_stats.c216 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()
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/lib/gcc/arm-none-linux-gnueabihf/10.3.1/plugin/include/
H A Dansidecl.h298 # define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1)))
306 # define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2)))
314 # define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2)))
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/10.3.1/plugin/include/
H A Dansidecl.h298 # define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1)))
306 # define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2)))
314 # define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2)))
/OK3568_Linux_fs/kernel/arch/powerpc/kernel/
H A Deeh_pe.c49 size_t alloc_size; in eeh_pe_alloc() local
51 alloc_size = sizeof(struct eeh_pe); in eeh_pe_alloc()
53 alloc_size = ALIGN(alloc_size, cache_line_size()); in eeh_pe_alloc()
54 alloc_size += eeh_pe_aux_size; in eeh_pe_alloc()
58 pe = kzalloc(alloc_size, GFP_KERNEL); in eeh_pe_alloc()
/OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/
H A Dmali_kbase_mem.h350 size_t alloc_size = sizeof(*alloc) + sizeof(*alloc->pages) * nr_pages; in kbase_alloc_create() local
355 alloc_size += nr_pages * in kbase_alloc_create()
369 if (alloc_size > KBASE_MEM_PHY_ALLOC_LARGE_THRESHOLD) in kbase_alloc_create()
370 alloc = vzalloc(alloc_size); in kbase_alloc_create()
372 alloc = kzalloc(alloc_size, GFP_KERNEL); in kbase_alloc_create()
378 if (alloc_size > KBASE_MEM_PHY_ALLOC_LARGE_THRESHOLD) in kbase_alloc_create()

1234567