Home
last modified time | relevance | path

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

123

/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.c306 size_t alloc_size; in mlxsw_sp_acl_ruleset_create() local
309 alloc_size = sizeof(*ruleset) + ops->ruleset_priv_size; in mlxsw_sp_acl_ruleset_create()
310 ruleset = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_ruleset_create()
858 size_t alloc_size; in mlxsw_sp_acl_init() local
861 alloc_size = sizeof(*acl) + mlxsw_sp_acl_tcam_priv_size(mlxsw_sp); in mlxsw_sp_acl_init()
862 acl = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_init()
Dcore_acl_flex_keys.c190 size_t alloc_size; in mlxsw_afk_picker() local
193 alloc_size = sizeof(picker->hits[0]) * mlxsw_afk->blocks_count; in mlxsw_afk_picker()
194 picker = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_afk_picker()
Dswitchib.c331 size_t alloc_size; in mlxsw_sib_ports_create() local
336 alloc_size = sizeof(struct mlxsw_sib_port *) * MLXSW_PORT_MAX_IB_PORTS; in mlxsw_sib_ports_create()
337 mlxsw_sib->ports = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sib_ports_create()
/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()
180 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.c173 unsigned int alloc_size; in cpufreq_stats_create_table() local
188 alloc_size = count * sizeof(int) + count * sizeof(u64); in cpufreq_stats_create_table()
190 alloc_size += count * count * sizeof(int); in cpufreq_stats_create_table()
193 stats->time_in_state = kzalloc(alloc_size, GFP_KERNEL); in cpufreq_stats_create_table()
Dcpufreq_times.c98 size_t alloc_size = sizeof(*uid_entry) + max_state * in find_or_register_uid_locked() local
108 temp = __krealloc(uid_entry, alloc_size, GFP_ATOMIC); in find_or_register_uid_locked()
122 uid_entry = kzalloc(alloc_size, GFP_ATOMIC); in find_or_register_uid_locked()
/drivers/iommu/
Ddma-iommu.c924 size_t alloc_size = PAGE_ALIGN(size); in __iommu_dma_free() local
925 int count = alloc_size >> PAGE_SHIFT; in __iommu_dma_free()
930 dma_free_from_pool(cpu_addr, alloc_size)) in __iommu_dma_free()
941 dma_common_free_remap(cpu_addr, alloc_size); in __iommu_dma_free()
950 dma_free_contiguous(dev, page, alloc_size); in __iommu_dma_free()
964 size_t alloc_size = PAGE_ALIGN(size); in iommu_dma_alloc_pages() local
969 page = dma_alloc_contiguous(dev, alloc_size, gfp); in iommu_dma_alloc_pages()
971 page = alloc_pages_node(node, gfp, get_order(alloc_size)); in iommu_dma_alloc_pages()
978 cpu_addr = dma_common_contiguous_remap(page, alloc_size, in iommu_dma_alloc_pages()
990 memset(cpu_addr, 0, alloc_size); in iommu_dma_alloc_pages()
[all …]
/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/gpu/drm/ttm/
Dttm_page_alloc.c88 unsigned alloc_size; member
181 m->options.alloc_size = val; in ttm_pool_store()
199 val = m->options.alloc_size; in ttm_pool_show()
593 unsigned alloc_size = _manager->options.alloc_size; in ttm_page_pool_fill_locked() local
603 cstate, alloc_size, 0); in ttm_page_pool_fill_locked()
609 pool->npages += alloc_size; in ttm_page_pool_fill_locked()
995 _manager->options.alloc_size = NUM_PAGES_TO_ALLOC; in ttm_page_alloc_init()
/drivers/mtd/parsers/
Dcmdlinepart.c168 int alloc_size; in newpart() local
171 alloc_size = *num_parts * sizeof(struct mtd_partition) + in newpart()
174 parts = kzalloc(alloc_size, GFP_KERNEL); in newpart()
/drivers/i2c/busses/
Di2c-cros-ec-tunnel.c181 int alloc_size; in ec_i2c_xfer() local
198 alloc_size = max(request_len, response_len); in ec_i2c_xfer()
199 msg = kmalloc(sizeof(*msg) + alloc_size, GFP_KERNEL); in ec_i2c_xfer()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_ib.c133 uint32_t status = 0, alloc_size; in amdgpu_ib_schedule() local
163 alloc_size = ring->funcs->emit_frame_size + num_ibs * in amdgpu_ib_schedule()
166 r = amdgpu_ring_alloc(ring, alloc_size); in amdgpu_ib_schedule()
/drivers/net/phy/
Dmdio_bus.c150 size_t alloc_size; in mdiobus_alloc_size() local
155 alloc_size = aligned_size + size; in mdiobus_alloc_size()
157 alloc_size = sizeof(*bus); in mdiobus_alloc_size()
159 bus = kzalloc(alloc_size, GFP_KERNEL); in mdiobus_alloc_size()
/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/staging/wusbcore/
Ddevconnect.c765 size_t alloc_size = 32, desc_size = 4; in wusb_dev_bos_add() local
767 bos = kmalloc(alloc_size, GFP_KERNEL); in wusb_dev_bos_add()
777 if (desc_size >= alloc_size) { in wusb_dev_bos_add()
779 alloc_size = desc_size; in wusb_dev_bos_add()
780 bos = kmalloc(alloc_size, GFP_KERNEL); in wusb_dev_bos_add()
/drivers/firmware/efi/libstub/
Defi-stub-helper.c694 unsigned long alloc_size, in efi_relocate_kernel() argument
705 if (!image_addr || !image_size || !alloc_size) in efi_relocate_kernel()
707 if (alloc_size < image_size) in efi_relocate_kernel()
720 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel()
730 status = efi_low_alloc_above(sys_table_arg, alloc_size, in efi_relocate_kernel()
/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.c1087 size_t alloc_size; in w5100_probe() local
1089 alloc_size = sizeof(*priv); in w5100_probe()
1091 alloc_size = ALIGN(alloc_size, NETDEV_ALIGN); in w5100_probe()
1092 alloc_size += sizeof_ops_priv; in w5100_probe()
1094 alloc_size += NETDEV_ALIGN - 1; in w5100_probe()
1096 ndev = alloc_etherdev(alloc_size); in w5100_probe()
/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/iio/
Dindustrialio-core.c1427 size_t alloc_size; in iio_device_alloc() local
1429 alloc_size = sizeof(struct iio_dev); in iio_device_alloc()
1431 alloc_size = ALIGN(alloc_size, IIO_ALIGN); in iio_device_alloc()
1432 alloc_size += sizeof_priv; in iio_device_alloc()
1435 alloc_size += IIO_ALIGN - 1; in iio_device_alloc()
1437 dev = kzalloc(alloc_size, GFP_KERNEL); in iio_device_alloc()
/drivers/soc/qcom/
Dsmem.c354 size_t alloc_size; in qcom_smem_alloc_private() local
371 alloc_size = sizeof(*hdr) + ALIGN(size, 8); in qcom_smem_alloc_private()
372 if ((void *)hdr + alloc_size > cached) { in qcom_smem_alloc_private()
389 le32_add_cpu(&phdr->offset_free_uncached, alloc_size); in qcom_smem_alloc_private()
/drivers/ntb/
Dntb_transport.c210 size_t alloc_size; member
802 dma_free_coherent(&pdev->dev, mw->alloc_size, in ntb_free_mw()
806 mw->alloc_size = 0; in ntb_free_mw()
818 alloc_addr = dma_alloc_coherent(dma_dev, mw->alloc_size, in ntb_alloc_mw_buffer()
822 mw->alloc_size); in ntb_alloc_mw_buffer()
834 if (mw->alloc_size > mw->buff_size) { in ntb_alloc_mw_buffer()
850 dma_free_coherent(dma_dev, mw->alloc_size, alloc_addr, dma_addr); in ntb_alloc_mw_buffer()
886 mw->alloc_size = buff_size; in ntb_set_mw()
890 mw->alloc_size *= 2; in ntb_set_mw()
897 mw->alloc_size = 0; in ntb_set_mw()

123