Home
last modified time | relevance | path

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

123

/drivers/firmware/efi/libstub/
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 …]
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()
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()
/drivers/net/ethernet/mellanox/mlxsw/
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 …]
Dspectrum_acl.c167 size_t alloc_size; in mlxsw_sp_acl_ruleset_create() local
170 alloc_size = sizeof(*ruleset) + ops->ruleset_priv_size; in mlxsw_sp_acl_ruleset_create()
171 ruleset = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_ruleset_create()
959 size_t alloc_size; in mlxsw_sp_acl_init() local
962 alloc_size = sizeof(*acl) + mlxsw_sp_acl_tcam_priv_size(mlxsw_sp); in mlxsw_sp_acl_init()
963 acl = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_init()
/drivers/gpu/drm/i915/gt/uc/
Dintel_guc_ads.c357 u32 total_size = 0, alloc_size, real_size; in guc_prep_golden_context() local
393 alloc_size = PAGE_ALIGN(real_size); in guc_prep_golden_context()
394 total_size += alloc_size; in guc_prep_golden_context()
401 addr_ggtt += alloc_size; in guc_prep_golden_context()
435 u32 total_size = 0, alloc_size, real_size; in guc_init_golden_context() local
467 alloc_size = PAGE_ALIGN(real_size); in guc_init_golden_context()
468 total_size += alloc_size; in guc_init_golden_context()
481 addr_ggtt += alloc_size; in guc_init_golden_context()
485 ptr += alloc_size; in guc_init_golden_context()
/drivers/gpu/drm/vmwgfx/
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()
175 usimple = kzalloc(alloc_size, GFP_KERNEL); in vmw_simple_resource_create_ioctl()
/drivers/md/
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 …]
/drivers/cpufreq/
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()
/drivers/iio/adc/
Dadi-axi-adc.c184 size_t alloc_size; in adi_axi_adc_conv_register() local
186 alloc_size = ALIGN(sizeof(struct adi_axi_adc_client), IIO_ALIGN); in adi_axi_adc_conv_register()
188 alloc_size += ALIGN(sizeof_priv, IIO_ALIGN); in adi_axi_adc_conv_register()
190 cl = kzalloc(alloc_size, GFP_KERNEL); in adi_axi_adc_conv_register()
/drivers/usb/host/
Dehci-dbg.c339 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()
/drivers/i2c/busses/
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()
/drivers/mtd/parsers/
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()
/drivers/iommu/
Ddma-iommu.c1165 size_t alloc_size = PAGE_ALIGN(size); in __iommu_dma_free() local
1166 int count = alloc_size >> PAGE_SHIFT; in __iommu_dma_free()
1171 dma_free_from_pool(dev, cpu_addr, alloc_size)) in __iommu_dma_free()
1182 dma_common_free_remap(cpu_addr, alloc_size); in __iommu_dma_free()
1191 dma_free_contiguous(dev, page, alloc_size); in __iommu_dma_free()
1205 size_t alloc_size = PAGE_ALIGN(size); in iommu_dma_alloc_pages() local
1210 page = dma_alloc_contiguous(dev, alloc_size, gfp); in iommu_dma_alloc_pages()
1212 page = alloc_pages_node(node, gfp, get_order(alloc_size)); in iommu_dma_alloc_pages()
1219 cpu_addr = dma_common_contiguous_remap(page, alloc_size, in iommu_dma_alloc_pages()
1231 memset(cpu_addr, 0, alloc_size); in iommu_dma_alloc_pages()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_ib.c137 uint32_t status = 0, alloc_size; in amdgpu_ib_schedule() local
174 alloc_size = ring->funcs->emit_frame_size + num_ibs * in amdgpu_ib_schedule()
177 r = amdgpu_ring_alloc(ring, alloc_size); in amdgpu_ib_schedule()
/drivers/dca/
Ddca-core.c312 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()
/drivers/bus/mhi/host/
Dinit.c134 ring->alloc_size = len + (len - 1); in mhi_alloc_aligned_ring()
135 ring->pre_aligned = dma_alloc_coherent(mhi_cntrl->cntrl_dev, ring->alloc_size, in mhi_alloc_aligned_ring()
227 dma_free_coherent(mhi_cntrl->cntrl_dev, ring->alloc_size, in mhi_deinit_dev_ctxt()
243 dma_free_coherent(mhi_cntrl->cntrl_dev, ring->alloc_size, in mhi_deinit_dev_ctxt()
395 dma_free_coherent(mhi_cntrl->cntrl_dev, ring->alloc_size, in mhi_init_dev_ctxt()
411 dma_free_coherent(mhi_cntrl->cntrl_dev, ring->alloc_size, in mhi_init_dev_ctxt()
585 dma_free_coherent(mhi_cntrl->cntrl_dev, tre_ring->alloc_size, in mhi_deinit_chan_ctxt()
628 dma_free_coherent(mhi_cntrl->cntrl_dev, tre_ring->alloc_size, in mhi_init_chan_ctxt()
/drivers/infiniband/core/
Duverbs_uapi.c16 static void *uapi_add_elm(struct uverbs_api *uapi, u32 key, size_t alloc_size) in uapi_add_elm() argument
24 elm = kzalloc(alloc_size, GFP_KERNEL); in uapi_add_elm()
37 size_t alloc_size, bool *exists) in uapi_add_get_elm() argument
41 elm = uapi_add_elm(uapi, key, alloc_size); in uapi_add_get_elm()
/drivers/net/ethernet/wiznet/
Dw5100.c1084 size_t alloc_size; in w5100_probe() local
1086 alloc_size = sizeof(*priv); in w5100_probe()
1088 alloc_size = ALIGN(alloc_size, NETDEV_ALIGN); in w5100_probe()
1089 alloc_size += sizeof_ops_priv; in w5100_probe()
1091 alloc_size += NETDEV_ALIGN - 1; in w5100_probe()
1093 ndev = alloc_etherdev(alloc_size); in w5100_probe()
/drivers/net/phy/
Dmdio_bus.c146 size_t alloc_size; in mdiobus_alloc_size() local
151 alloc_size = aligned_size + size; in mdiobus_alloc_size()
153 alloc_size = sizeof(*bus); in mdiobus_alloc_size()
155 bus = kzalloc(alloc_size, GFP_KERNEL); in mdiobus_alloc_size()
/drivers/gpu/host1x/
Dcdma.c57 iommu_unmap(host1x->domain, pb->dma, pb->alloc_size); in host1x_pushbuffer_destroy()
61 dma_free_wc(host1x->dev, pb->alloc_size, pb->mapped, pb->phys); in host1x_pushbuffer_destroy()
120 pb->alloc_size = size; in host1x_pushbuffer_init()
Dcdma.h40 u32 alloc_size; member
/drivers/soc/qcom/
Dsmem.c355 size_t alloc_size; in qcom_smem_alloc_private() local
372 alloc_size = sizeof(*hdr) + ALIGN(size, 8); in qcom_smem_alloc_private()
373 if ((void *)hdr + alloc_size > cached) { in qcom_smem_alloc_private()
390 le32_add_cpu(&phdr->offset_free_uncached, alloc_size); in qcom_smem_alloc_private()
/drivers/ntb/
Dntb_transport.c210 size_t alloc_size; member
800 dma_free_coherent(&pdev->dev, mw->alloc_size, in ntb_free_mw()
804 mw->alloc_size = 0; in ntb_free_mw()
816 alloc_addr = dma_alloc_coherent(dma_dev, mw->alloc_size, in ntb_alloc_mw_buffer()
820 mw->alloc_size); in ntb_alloc_mw_buffer()
832 if (mw->alloc_size > mw->buff_size) { in ntb_alloc_mw_buffer()
848 dma_free_coherent(dma_dev, mw->alloc_size, alloc_addr, dma_addr); in ntb_alloc_mw_buffer()
884 mw->alloc_size = buff_size; in ntb_set_mw()
888 mw->alloc_size *= 2; in ntb_set_mw()
895 mw->alloc_size = 0; in ntb_set_mw()
/drivers/hid/
Dhid-rmi.c648 size_t alloc_size; in rmi_probe() local
702 alloc_size = data->output_report_size + data->input_report_size; in rmi_probe()
704 data->writeReport = devm_kzalloc(&hdev->dev, alloc_size, GFP_KERNEL); in rmi_probe()

123