| /linux/net/xdp/ |
| H A D | xsk_buff_pool.c | 15 void xp_add_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_add_xsk() argument 20 spin_lock(&pool->xsk_tx_list_lock); in xp_add_xsk() 21 list_add_rcu(&xs->tx_list, &pool->xsk_tx_list); in xp_add_xsk() 22 spin_unlock(&pool->xsk_tx_list_lock); in xp_add_xsk() 25 void xp_del_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_del_xsk() argument 30 spin_lock(&pool->xsk_tx_list_lock); in xp_del_xsk() 32 spin_unlock(&pool->xsk_tx_list_lock); in xp_del_xsk() 35 void xp_destroy(struct xsk_buff_pool *pool) in xp_destroy() argument 37 if (!pool) in xp_destroy() 40 kvfree(pool in xp_destroy() 45 xp_alloc_tx_descs(struct xsk_buff_pool * pool,struct xdp_sock * xs) xp_alloc_tx_descs() argument 58 struct xsk_buff_pool *pool; xp_create_and_assign_umem() local 119 xp_set_rxq_info(struct xsk_buff_pool * pool,struct xdp_rxq_info * rxq) xp_set_rxq_info() argument 128 xp_fill_cb(struct xsk_buff_pool * pool,struct xsk_cb_desc * desc) xp_fill_cb() argument 140 xp_disable_drv_zc(struct xsk_buff_pool * pool) xp_disable_drv_zc() argument 159 xp_assign_dev(struct xsk_buff_pool * pool,struct net_device * netdev,u16 queue_id,u16 flags) xp_assign_dev() argument 268 xp_assign_dev_shared(struct xsk_buff_pool * pool,struct xdp_sock * umem_xs,struct net_device * dev,u16 queue_id) xp_assign_dev_shared() argument 285 xp_clear_dev(struct xsk_buff_pool * pool) xp_clear_dev() argument 302 struct xsk_buff_pool *pool = container_of(work, struct xsk_buff_pool, xp_release_deferred() local 323 xp_get_pool(struct xsk_buff_pool * pool) xp_get_pool() argument 328 xp_put_pool(struct xsk_buff_pool * pool) xp_put_pool() argument 342 xp_find_dma_map(struct xsk_buff_pool * pool) xp_find_dma_map() argument 402 xp_dma_unmap(struct xsk_buff_pool * pool,unsigned long attrs) xp_dma_unmap() argument 437 xp_init_dma_info(struct xsk_buff_pool * pool,struct xsk_dma_map * dma_map) xp_init_dma_info() argument 464 xp_dma_map(struct xsk_buff_pool * pool,struct device * dev,unsigned long attrs,struct page ** pages,u32 nr_pages) xp_dma_map() argument 509 xp_addr_crosses_non_contig_pg(struct xsk_buff_pool * pool,u64 addr) xp_addr_crosses_non_contig_pg() argument 515 xp_check_unaligned(struct xsk_buff_pool * pool,u64 * addr) xp_check_unaligned() argument 525 xp_check_aligned(struct xsk_buff_pool * pool,u64 * addr) xp_check_aligned() argument 531 xp_get_xskb(struct xsk_buff_pool * pool,u64 addr) xp_get_xskb() argument 547 __xp_alloc(struct xsk_buff_pool * pool) __xp_alloc() argument 578 xp_alloc(struct xsk_buff_pool * pool) xp_alloc() argument 604 xp_alloc_new_from_fq(struct xsk_buff_pool * pool,struct xdp_buff ** xdp,u32 max) xp_alloc_new_from_fq() argument 640 xp_alloc_reused(struct xsk_buff_pool * pool,struct xdp_buff ** xdp,u32 nb_entries) xp_alloc_reused() argument 660 xp_alloc_slow(struct xsk_buff_pool * pool,struct xdp_buff ** xdp,u32 max) xp_alloc_slow() argument 678 xp_alloc_batch(struct xsk_buff_pool * pool,struct xdp_buff ** xdp,u32 max) xp_alloc_batch() argument 702 xp_can_alloc(struct xsk_buff_pool * pool,u32 count) xp_can_alloc() argument 728 __xp_raw_get_addr(const struct xsk_buff_pool * pool,u64 addr) __xp_raw_get_addr() argument 733 __xp_raw_get_data(const struct xsk_buff_pool * pool,u64 addr) __xp_raw_get_data() argument 738 xp_raw_get_data(struct xsk_buff_pool * pool,u64 addr) xp_raw_get_data() argument 744 __xp_raw_get_dma(const struct xsk_buff_pool * pool,u64 addr) __xp_raw_get_dma() argument 751 xp_raw_get_dma(struct xsk_buff_pool * pool,u64 addr) xp_raw_get_dma() argument 769 xp_raw_get_ctx(const struct xsk_buff_pool * pool,u64 addr) xp_raw_get_ctx() argument [all...] |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/ |
| H A D | pool.c | 9 switch (resource->pool->type) { in hws_pool_free_one_resource() 11 mlx5hws_cmd_ste_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource() 14 mlx5hws_cmd_stc_destroy(resource->pool->ctx->mdev, resource->base_id); in hws_pool_free_one_resource() 23 static void hws_pool_resource_free(struct mlx5hws_pool *pool) in hws_pool_resource_free() argument 25 hws_pool_free_one_resource(pool->resource); in hws_pool_resource_free() 26 pool->resource = NULL; in hws_pool_resource_free() 28 if (pool->tbl_type == MLX5HWS_TABLE_TYPE_FDB) { in hws_pool_resource_free() 29 hws_pool_free_one_resource(pool->mirror_resource); in hws_pool_resource_free() 30 pool->mirror_resource = NULL; in hws_pool_resource_free() 35 hws_pool_create_one_resource(struct mlx5hws_pool *pool, u32 log_range, in hws_pool_create_one_resource() argument [all …]
|
| /linux/drivers/net/ethernet/ti/ |
| H A D | k3-cppi-desc-pool.c | 2 /* TI K3 CPPI5 descriptors pool API 15 #include "k3-cppi-desc-pool.h" 28 void k3_cppi_desc_pool_destroy(struct k3_cppi_desc_pool *pool) in k3_cppi_desc_pool_destroy() argument 30 if (!pool) in k3_cppi_desc_pool_destroy() 33 WARN(gen_pool_size(pool->gen_pool) != gen_pool_avail(pool->gen_pool), in k3_cppi_desc_pool_destroy() 35 gen_pool_size(pool->gen_pool), in k3_cppi_desc_pool_destroy() 36 gen_pool_avail(pool->gen_pool)); in k3_cppi_desc_pool_destroy() 37 if (pool->cpumem) in k3_cppi_desc_pool_destroy() 38 dma_free_coherent(pool->dev, pool->mem_size, pool->cpumem, in k3_cppi_desc_pool_destroy() 39 pool->dma_addr); in k3_cppi_desc_pool_destroy() [all …]
|
| /linux/net/core/ |
| H A D | page_pool.c | 46 #define alloc_stat_inc(pool, __stat) (pool->alloc_stats.__stat++) argument 48 #define recycle_stat_inc(pool, __stat) \ argument 50 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \ 54 #define recycle_stat_add(pool, __stat, val) \ argument 56 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \ 75 * page_pool_get_stats() - fetch page pool stats 76 * @pool: pool from which page was allocated 79 * Deprecated driver API for querying stats. Page pool stat 85 page_pool_get_stats(const struct page_pool * pool,struct page_pool_stats * stats) page_pool_get_stats() argument 161 page_pool_producer_lock(struct page_pool * pool) page_pool_producer_lock() argument 174 page_pool_producer_unlock(struct page_pool * pool,bool in_softirq) page_pool_producer_unlock() argument 193 page_pool_init(struct page_pool * pool,const struct page_pool_params * params,int cpuid) page_pool_init() argument 321 page_pool_uninit(struct page_pool * pool) page_pool_uninit() argument 345 struct page_pool *pool; page_pool_create_percpu() local 383 page_pool_refill_alloc_cache(struct page_pool * pool) page_pool_refill_alloc_cache() argument 436 __page_pool_get_cached(struct page_pool * pool) __page_pool_get_cached() argument 452 __page_pool_dma_sync_for_device(const struct page_pool * pool,netmem_ref netmem,u32 dma_sync_size) __page_pool_dma_sync_for_device() argument 466 page_pool_dma_sync_for_device(const struct page_pool * pool,netmem_ref netmem,u32 dma_sync_size) page_pool_dma_sync_for_device() argument 480 page_pool_register_dma_index(struct page_pool * pool,netmem_ref netmem,gfp_t gfp) page_pool_register_dma_index() argument 505 page_pool_release_dma_index(struct page_pool * pool,netmem_ref netmem) page_pool_release_dma_index() argument 530 page_pool_dma_map(struct page_pool * pool,netmem_ref netmem,gfp_t gfp) page_pool_dma_map() argument 569 __page_pool_alloc_page_order(struct page_pool * pool,gfp_t gfp) __page_pool_alloc_page_order() argument 595 __page_pool_alloc_netmems_slow(struct page_pool * pool,gfp_t gfp) __page_pool_alloc_netmems_slow() argument 659 page_pool_alloc_netmems(struct page_pool * pool,gfp_t gfp) page_pool_alloc_netmems() argument 678 page_pool_alloc_pages(struct page_pool * pool,gfp_t gfp) page_pool_alloc_pages() argument 689 page_pool_inflight(const struct page_pool * pool,bool strict) page_pool_inflight() argument 708 page_pool_set_pp_info(struct page_pool * pool,netmem_ref netmem) page_pool_set_pp_info() argument 730 __page_pool_release_netmem_dma(struct page_pool * pool,netmem_ref netmem) __page_pool_release_netmem_dma() argument 758 page_pool_return_netmem(struct page_pool * pool,netmem_ref netmem) page_pool_return_netmem() argument 785 page_pool_recycle_in_ring(struct page_pool * pool,netmem_ref netmem) page_pool_recycle_in_ring() argument 805 page_pool_recycle_in_cache(netmem_ref netmem,struct page_pool * pool) page_pool_recycle_in_cache() argument 832 __page_pool_put_page(struct page_pool * pool,netmem_ref netmem,unsigned int dma_sync_size,bool allow_direct) __page_pool_put_page() argument 877 page_pool_napi_local(const struct page_pool * pool) page_pool_napi_local() argument 904 page_pool_put_unrefed_netmem(struct page_pool * pool,netmem_ref netmem,unsigned int dma_sync_size,bool allow_direct) page_pool_put_unrefed_netmem() argument 920 page_pool_put_unrefed_page(struct page_pool * pool,struct page * page,unsigned int dma_sync_size,bool allow_direct) page_pool_put_unrefed_page() argument 928 page_pool_recycle_ring_bulk(struct page_pool * pool,netmem_ref * bulk,u32 bulk_len) page_pool_recycle_ring_bulk() argument 989 struct page_pool *pool = NULL; page_pool_put_netmem_bulk() local 1027 page_pool_drain_frag(struct page_pool * pool,netmem_ref netmem) page_pool_drain_frag() argument 1045 page_pool_free_frag(struct page_pool * pool) page_pool_free_frag() argument 1058 page_pool_alloc_frag_netmem(struct page_pool * pool,unsigned int * offset,unsigned int size,gfp_t gfp) page_pool_alloc_frag_netmem() argument 1103 page_pool_alloc_frag(struct page_pool * pool,unsigned int * offset,unsigned int size,gfp_t gfp) page_pool_alloc_frag() argument 1111 page_pool_empty_ring(struct page_pool * pool) page_pool_empty_ring() argument 1126 __page_pool_destroy(struct page_pool * pool) __page_pool_destroy() argument 1137 page_pool_empty_alloc_cache_once(struct page_pool * pool) page_pool_empty_alloc_cache_once() argument 1154 page_pool_scrub(struct page_pool * pool) page_pool_scrub() argument 1186 page_pool_release(struct page_pool * pool) page_pool_release() argument 1205 struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw); page_pool_release_retry() local 1234 page_pool_use_xdp_mem(struct page_pool * pool,void (* disconnect)(void *),const struct xdp_mem_info * mem) page_pool_use_xdp_mem() argument 1258 page_pool_enable_direct_recycling(struct page_pool * pool,struct napi_struct * napi) page_pool_enable_direct_recycling() argument 1271 page_pool_disable_direct_recycling(struct page_pool * pool) page_pool_disable_direct_recycling() argument 1289 page_pool_destroy(struct page_pool * pool) page_pool_destroy() argument 1313 page_pool_update_nid(struct page_pool * pool,int new_nid) page_pool_update_nid() argument 1336 net_mp_niov_set_page_pool(struct page_pool * pool,struct net_iov * niov) net_mp_niov_set_page_pool() argument [all...] |
| H A D | page_pool_user.c | 18 /* Protects: page_pools, netdevice->page_pools, pool->p.napi, pool->slow.netdev, 19 * pool->user. 25 * linked to a netdev at creation time. Following page pool "visibility" 32 * to error, or (c) the entire namespace which owned this pool disappeared 36 typedef int (*pp_nl_fill_cb)(struct sk_buff *rsp, const struct page_pool *pool, 42 struct page_pool *pool; in netdev_nl_page_pool_get_do() local 47 pool = xa_load(&page_pools, id); in netdev_nl_page_pool_get_do() 48 if (!pool || hlist_unhashed(&pool in netdev_nl_page_pool_get_do() 88 struct page_pool *pool; netdev_nl_page_pool_get_dump() local 114 page_pool_nl_stats_fill(struct sk_buff * rsp,const struct page_pool * pool,const struct genl_info * info) page_pool_nl_stats_fill() argument 216 page_pool_nl_fill(struct sk_buff * rsp,const struct page_pool * pool,const struct genl_info * info) page_pool_nl_fill() argument 262 netdev_nl_page_pool_event(const struct page_pool * pool,u32 cmd) netdev_nl_page_pool_event() argument 311 page_pool_list(struct page_pool * pool) page_pool_list() argument 337 page_pool_detached(struct page_pool * pool) page_pool_detached() argument 345 page_pool_unlist(struct page_pool * pool) page_pool_unlist() argument 359 struct page_pool *pool; page_pool_check_memory_provider() local 381 struct page_pool *pool; page_pool_unreg_netdev_wipe() local 394 struct page_pool *pool, *last; page_pool_unreg_netdev() local [all...] |
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_mem_pool.c | 19 * struct xe_mem_pool - DRM MM pool for sub-allocating memory from a BO on an 22 * The XE memory pool is a DRM MM manager that provides sub-allocation of memory 27 * The memory pool maintains a primary BO that is pinned in the GGTT and mapped 31 * The API provided by the memory pool allows clients to allocate and free memory 38 /** @bo: Active pool BO (GGTT-pinned, CPU-mapped). */ 55 static struct xe_tile *pool_to_tile(struct xe_mem_pool *pool) in pool_to_tile() argument 57 return pool->bo->tile; in pool_to_tile() 62 struct xe_mem_pool *pool = arg; in fini_pool_action() local 64 if (pool->is_iomem) in fini_pool_action() 65 kvfree(pool->cpu_addr); in fini_pool_action() [all …]
|
| /linux/mm/ |
| H A D | mempool.c | 3 * memory buffer pool support. Such pools are mostly used 41 static void poison_error(struct mempool *pool, void *element, size_t size, in poison_error() argument 44 const int nr = pool->curr_nr; in poison_error() 50 pr_err("Mempool %p size %zu\n", pool, size); in poison_error() 58 static void __check_element(struct mempool *pool, void *element, size_t size) in __check_element() argument 67 poison_error(pool, element, size, i); in __check_element() 74 static void check_element(struct mempool *pool, void *element) in check_element() argument 81 if (pool->free == mempool_kfree) { in check_element() 82 __check_element(pool, element, (size_t)pool in check_element() 113 poison_element(struct mempool * pool,void * element) poison_element() argument 144 check_element(struct mempool * pool,void * element) check_element() argument 147 poison_element(struct mempool * pool,void * element) poison_element() argument 152 kasan_poison_element(struct mempool * pool,void * element) kasan_poison_element() argument 163 kasan_unpoison_element(struct mempool * pool,void * element) kasan_unpoison_element() argument 175 add_element(struct mempool * pool,void * element) add_element() argument 183 remove_element(struct mempool * pool) remove_element() argument 204 mempool_exit(struct mempool * pool) mempool_exit() argument 223 mempool_destroy(struct mempool * pool) mempool_destroy() argument 233 mempool_init_node(struct mempool * pool,int min_nr,mempool_alloc_t * alloc_fn,mempool_free_t * free_fn,void * pool_data,gfp_t gfp_mask,int node_id) mempool_init_node() argument 285 mempool_init_noprof(struct mempool * pool,int min_nr,mempool_alloc_t * alloc_fn,mempool_free_t * free_fn,void * pool_data) mempool_init_noprof() argument 317 struct mempool *pool; mempool_create_node_noprof() local 351 mempool_resize(struct mempool * pool,int new_min_nr) mempool_resize() argument 412 mempool_alloc_from_pool(struct mempool * pool,void ** elems,unsigned int count,unsigned int allocated,gfp_t gfp_mask) mempool_alloc_from_pool() argument 492 mempool_alloc_bulk_noprof(struct mempool * pool,void ** elems,unsigned int count,unsigned int allocated) mempool_alloc_bulk_noprof() argument 552 mempool_alloc_noprof(struct mempool * pool,gfp_t gfp_mask) mempool_alloc_noprof() argument 604 mempool_alloc_preallocated(struct mempool * pool) mempool_alloc_preallocated() argument 627 mempool_free_bulk(struct mempool * pool,void ** elems,unsigned int count) mempool_free_bulk() argument 708 mempool_free(void * element,struct mempool * pool) mempool_free() argument [all...] |
| /linux/drivers/md/ |
| H A D | dm-thin.c | 42 * The block size of the device holding pool data must be 194 * A pool device ties together a metadata device and a data device. It 201 * The pool runs in various modes. Ordered in degraded order for comparisons. 232 struct pool { struct 234 struct dm_target *ti; /* Only set if a pool target is bound */ argument 290 static void metadata_operation_failed(struct pool *pool, const char *op, int r); argument 292 static enum pool_mode get_pool_mode(struct pool *pool) in get_pool_mode() argument 294 return pool->pf.mode; in get_pool_mode() 297 static void notify_of_pool_mode_change(struct pool *pool) in notify_of_pool_mode_change() argument 307 enum pool_mode mode = get_pool_mode(pool); in notify_of_pool_mode_change() [all …]
|
| /linux/drivers/gpu/drm/panthor/ |
| H A D | panthor_heap.c | 79 * struct panthor_heap_pool - Pool of heap contexts 81 * The pool is attached to a panthor_file and can't be shared across processes. 90 /** @vm: VM this pool is bound to. */ 102 /** @size: Size of all chunks across all heaps in the pool. */ 114 static int panthor_get_heap_ctx_offset(struct panthor_heap_pool *pool, int id) in panthor_get_heap_ctx_offset() argument 116 return panthor_heap_ctx_stride(pool->ptdev) * id; in panthor_get_heap_ctx_offset() 119 static void *panthor_get_heap_ctx(struct panthor_heap_pool *pool, int id) in panthor_get_heap_ctx() argument 121 return pool->gpu_contexts->kmap + in panthor_get_heap_ctx() 122 panthor_get_heap_ctx_offset(pool, id); in panthor_get_heap_ctx() 125 static void panthor_free_heap_chunk(struct panthor_heap_pool *pool, in panthor_free_heap_chunk() argument 140 panthor_alloc_heap_chunk(struct panthor_heap_pool * pool,struct panthor_heap * heap,bool initial_chunk) panthor_alloc_heap_chunk() argument 202 panthor_free_heap_chunks(struct panthor_heap_pool * pool,struct panthor_heap * heap) panthor_free_heap_chunks() argument 211 panthor_alloc_heap_chunks(struct panthor_heap_pool * pool,struct panthor_heap * heap,u32 chunk_count) panthor_alloc_heap_chunks() argument 228 panthor_heap_destroy_locked(struct panthor_heap_pool * pool,u32 handle) panthor_heap_destroy_locked() argument 247 panthor_heap_destroy(struct panthor_heap_pool * pool,u32 handle) panthor_heap_destroy() argument 274 panthor_heap_create(struct panthor_heap_pool * pool,u32 initial_chunk_count,u32 chunk_size,u32 max_chunks,u32 target_in_flight,u64 * heap_ctx_gpu_va,u64 * first_chunk_gpu_va) panthor_heap_create() argument 370 panthor_heap_return_chunk(struct panthor_heap_pool * pool,u64 heap_gpu_va,u64 chunk_gpu_va) panthor_heap_return_chunk() argument 432 panthor_heap_grow(struct panthor_heap_pool * pool,u64 heap_gpu_va,u32 renderpasses_in_flight,u32 pending_frag_count,u64 * new_chunk_gpu_va) panthor_heap_grow() argument 494 struct panthor_heap_pool *pool = panthor_heap_pool_release() local 505 panthor_heap_pool_put(struct panthor_heap_pool * pool) panthor_heap_pool_put() argument 518 panthor_heap_pool_get(struct panthor_heap_pool * pool) panthor_heap_pool_get() argument 541 struct panthor_heap_pool *pool; panthor_heap_pool_create() local 595 panthor_heap_pool_destroy(struct panthor_heap_pool * pool) panthor_heap_pool_destroy() argument 626 panthor_heap_pool_size(struct panthor_heap_pool * pool) panthor_heap_pool_size() argument [all...] |
| /linux/kernel/cgroup/ |
| H A D | dmem.c | 113 static void dmemcg_pool_get(struct dmem_cgroup_pool_state *pool) in dmemcg_pool_get() argument 115 refcount_inc(&pool->ref); in dmemcg_pool_get() 118 static bool dmemcg_pool_tryget(struct dmem_cgroup_pool_state *pool) in dmemcg_pool_tryget() argument 120 return refcount_inc_not_zero(&pool->ref); in dmemcg_pool_tryget() 123 static void dmemcg_pool_put(struct dmem_cgroup_pool_state *pool) in dmemcg_pool_put() argument 125 if (!refcount_dec_and_test(&pool->ref)) in dmemcg_pool_put() 128 call_rcu(&pool->rcu, dmemcg_pool_free_rcu); in dmemcg_pool_put() 133 struct dmem_cgroup_pool_state *pool = container_of(rcu, typeof(*pool), rcu); in dmemcg_pool_free_rcu() local 135 if (pool->parent) in dmemcg_pool_free_rcu() 136 dmemcg_pool_put(pool->parent); in dmemcg_pool_free_rcu() [all …]
|
| /linux/sound/core/seq/ |
| H A D | seq_memory.c | 22 static inline int snd_seq_pool_available(struct snd_seq_pool *pool) in snd_seq_pool_available() argument 24 return pool->total_elements - atomic_read(&pool->counter); in snd_seq_pool_available() 27 static inline int snd_seq_output_ok(struct snd_seq_pool *pool) in snd_seq_output_ok() argument 29 return snd_seq_pool_available(pool) >= pool->room; in snd_seq_output_ok() 225 static inline void free_cell(struct snd_seq_pool *pool, in free_cell() argument 228 cell->next = pool->free; in free_cell() 229 pool->free = cell; in free_cell() 230 atomic_dec(&pool in free_cell() 235 struct snd_seq_pool *pool; snd_seq_cell_free() local 267 snd_seq_cell_alloc(struct snd_seq_pool * pool,struct snd_seq_event_cell ** cellp,int nonblock,struct file * file,struct mutex * mutexp) snd_seq_cell_alloc() argument 339 snd_seq_event_dup(struct snd_seq_pool * pool,struct snd_seq_event * event,struct snd_seq_event_cell ** cellp,int nonblock,struct file * file,struct mutex * mutexp) snd_seq_event_dup() argument 426 snd_seq_pool_poll_wait(struct snd_seq_pool * pool,struct file * file,poll_table * wait) snd_seq_pool_poll_wait() argument 436 snd_seq_pool_init(struct snd_seq_pool * pool) snd_seq_pool_init() argument 473 snd_seq_pool_mark_closing(struct snd_seq_pool * pool) snd_seq_pool_mark_closing() argument 482 snd_seq_pool_done(struct snd_seq_pool * pool) snd_seq_pool_done() argument 516 struct snd_seq_pool *pool; snd_seq_pool_new() local 540 struct snd_seq_pool *pool = *ppool; snd_seq_pool_delete() local 553 snd_seq_info_pool(struct snd_info_buffer * buffer,struct snd_seq_pool * pool,char * space) snd_seq_info_pool() argument [all...] |
| /linux/include/net/ |
| H A D | xdp_sock_drv.h | 27 void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries); 28 bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc); 29 u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max); 30 void xsk_tx_release(struct xsk_buff_pool *pool); 33 void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool); 34 void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool); 35 void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool); 36 void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool); 37 bool xsk_uses_need_wakeup(struct xsk_buff_pool *pool); 39 static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool) in xsk_pool_get_headroom() argument [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/ |
| H A D | dr_icm_pool.c | 24 struct mutex mutex; /* protect the ICM pool and ICM buddy */ 82 u32 offset = mlx5dr_icm_pool_dm_type_to_entry_size(chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_mr_addr() 94 u32 size = mlx5dr_icm_pool_dm_type_to_entry_size(chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_icm_addr() 102 chunk->buddy_mem->pool->icm_type); in mlx5dr_icm_pool_get_chunk_byte_size() 111 dr_icm_pool_mr_create(struct mlx5dr_icm_pool *pool) in dr_icm_pool_mr_create() argument 113 struct mlx5_core_dev *mdev = pool->dmn->mdev; in dr_icm_pool_mr_create() 123 icm_mr->dmn = pool->dmn; in dr_icm_pool_mr_create() 125 icm_mr->dm.length = mlx5dr_icm_pool_chunk_size_to_byte(pool->max_log_chunk_sz, in dr_icm_pool_mr_create() 126 pool->icm_type); in dr_icm_pool_mr_create() 128 switch (pool in dr_icm_pool_mr_create() 262 dr_icm_buddy_create(struct mlx5dr_icm_pool * pool) dr_icm_buddy_create() argument 321 dr_icm_chunk_init(struct mlx5dr_icm_chunk * chunk,struct mlx5dr_icm_pool * pool,enum mlx5dr_icm_chunk_size chunk_size,struct mlx5dr_icm_buddy_mem * buddy_mem_pool,unsigned int seg) dr_icm_chunk_init() argument 340 dr_icm_pool_is_sync_required(struct mlx5dr_icm_pool * pool) dr_icm_pool_is_sync_required() argument 345 dr_icm_pool_clear_hot_chunks_arr(struct mlx5dr_icm_pool * pool) dr_icm_pool_clear_hot_chunks_arr() argument 364 dr_icm_pool_sync_all_buddy_pools(struct mlx5dr_icm_pool * pool) dr_icm_pool_sync_all_buddy_pools() argument 385 dr_icm_handle_buddies_get_mem(struct mlx5dr_icm_pool * pool,enum mlx5dr_icm_chunk_size chunk_size,struct mlx5dr_icm_buddy_mem ** buddy,unsigned int * seg) dr_icm_handle_buddies_get_mem() argument 434 mlx5dr_icm_alloc_chunk(struct mlx5dr_icm_pool * pool,enum mlx5dr_icm_chunk_size chunk_size) mlx5dr_icm_alloc_chunk() argument 469 struct mlx5dr_icm_pool *pool = buddy->pool; mlx5dr_icm_free_chunk() local 494 mlx5dr_icm_pool_alloc_htbl(struct mlx5dr_icm_pool * pool) mlx5dr_icm_pool_alloc_htbl() argument 499 mlx5dr_icm_pool_free_htbl(struct mlx5dr_icm_pool * pool,struct mlx5dr_ste_htbl * htbl) mlx5dr_icm_pool_free_htbl() argument 508 struct mlx5dr_icm_pool *pool; mlx5dr_icm_pool_create() local 562 mlx5dr_icm_pool_destroy(struct mlx5dr_icm_pool * pool) mlx5dr_icm_pool_destroy() argument [all...] |
| H A D | dr_arg.c | 8 /* modify-header arg pool */ 18 /* argument pool area */ 23 struct mutex mutex; /* protect arg pool */ 31 static int dr_arg_pool_alloc_objs(struct dr_arg_pool *pool) in dr_arg_pool_alloc_objs() argument 43 pool->dmn->info.caps.log_header_modify_argument_granularity; in dr_arg_pool_alloc_objs() 46 max_t(u32, pool->dmn->info.caps.log_header_modify_argument_granularity, in dr_arg_pool_alloc_objs() 49 min_t(u32, pool->dmn->info.caps.log_header_modify_argument_max_alloc, in dr_arg_pool_alloc_objs() 52 if (pool->log_chunk_size > object_range) { in dr_arg_pool_alloc_objs() 53 mlx5dr_err(pool->dmn, "Required chunk size (%d) is not supported\n", in dr_arg_pool_alloc_objs() 54 pool->log_chunk_size); in dr_arg_pool_alloc_objs() [all …]
|
| /linux/lib/ |
| H A D | genalloc.c | 16 * available. If new memory is added to the pool a lock has to be 146 * gen_pool_create - create a new special memory pool 148 * @nid: node id of the node the pool structure should be allocated on, or -1 150 * Create a new special memory pool that can be used to manage special purpose 155 struct gen_pool *pool; in gen_pool_create() local 157 pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid); in gen_pool_create() 158 if (pool != NULL) { in gen_pool_create() 159 spin_lock_init(&pool->lock); in gen_pool_create() 160 INIT_LIST_HEAD(&pool->chunks); in gen_pool_create() 161 pool->min_alloc_order = min_alloc_order; in gen_pool_create() [all …]
|
| H A D | objpool.c | 19 objpool_init_percpu_slot(struct objpool_head *pool, in objpool_init_percpu_slot() argument 24 void *obj = (void *)&slot->entries[pool->capacity]; in objpool_init_percpu_slot() 28 slot->mask = pool->capacity - 1; in objpool_init_percpu_slot() 37 obj = obj + pool->obj_size; in objpool_init_percpu_slot() 40 pool->nr_objs++; in objpool_init_percpu_slot() 48 objpool_init_percpu_slots(struct objpool_head *pool, int nr_objs, in objpool_init_percpu_slots() argument 63 nodes = nr_objs / pool->nr_possible_cpus; in objpool_init_percpu_slots() 64 if (cpu_count < (nr_objs % pool->nr_possible_cpus)) in objpool_init_percpu_slots() 68 size = struct_size(slot, entries, pool->capacity) + in objpool_init_percpu_slots() 69 pool->obj_size * nodes; in objpool_init_percpu_slots() [all …]
|
| /linux/net/ceph/ |
| H A D | msgpool.c | 14 struct ceph_msgpool *pool = arg; in msgpool_alloc() local 17 msg = ceph_msg_new2(pool->type, pool->front_len, pool->max_data_items, in msgpool_alloc() 20 dout("msgpool_alloc %s failed\n", pool->name); in msgpool_alloc() 22 dout("msgpool_alloc %s %p\n", pool->name, msg); in msgpool_alloc() 23 msg->pool = pool; in msgpool_alloc() 30 struct ceph_msgpool *pool = arg; in msgpool_free() local 33 dout("msgpool_release %s %p\n", pool->name, msg); in msgpool_free() 34 msg->pool = NULL; in msgpool_free() 38 int ceph_msgpool_init(struct ceph_msgpool *pool, int type, in ceph_msgpool_init() argument 43 pool->type = type; in ceph_msgpool_init() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A D | crypto.c | 13 * (for example, TLS) after last revalidation in a pool or a bulk. 19 #define MLX5_CRYPTO_DEK_POOL_CALC_FREED(pool) MLX5_CRYPTO_DEK_CALC_FREED(pool) argument 33 int num_deks; /* the total number of keys in this pool */ 34 int avail_deks; /* the number of available keys in this pool */ 35 int in_use_deks; /* the number of being used keys in this pool */ 288 mlx5_crypto_dek_bulk_create(struct mlx5_crypto_dek_pool *pool) in mlx5_crypto_dek_bulk_create() argument 290 struct mlx5_crypto_dek_priv *dek_priv = pool->mdev->mlx5e_res.dek_priv; in mlx5_crypto_dek_bulk_create() 291 struct mlx5_core_dev *mdev = pool->mdev; in mlx5_crypto_dek_bulk_create() 313 err = mlx5_crypto_create_dek_bulk(mdev, pool->key_purpose, in mlx5_crypto_dek_bulk_create() 334 mlx5_crypto_dek_pool_add_bulk(struct mlx5_crypto_dek_pool *pool) in mlx5_crypto_dek_pool_add_bulk() argument [all …]
|
| /linux/tools/testing/selftests/drivers/net/mlxsw/ |
| H A D | sharedbuffer_configuration.py | 16 objects, pool, tcbind and portpool. Provide an interface to get random 18 1. Pool: 22 - random pool number 30 for pool in pools: 31 self._pools.append(pool) 47 def _get_th(self, pool): argument 50 if pool["thtype"] == "dynamic": 58 for pool in self._pools: 59 if pool["type"] == "ingress": 60 ing_pools.append(pool) [all …]
|
| /linux/drivers/staging/octeon/ |
| H A D | ethernet-mem.c | 18 * cvm_oct_fill_hw_skbuff - fill the supplied hardware pool with skbuffs 19 * @pool: Pool to allocate an skbuff for 20 * @size: Size of the buffer needed for the pool 25 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) in cvm_oct_fill_hw_skbuff() 36 cvmx_fpa_free(skb->data, pool, size / 128); in cvm_oct_fill_hw_skbuff() 43 * cvm_oct_free_hw_skbuff- free hardware pool skbuffs 45 * @pool: Pool to allocate an skbuff for 46 * @size: Size of the buffer needed for the pool 24 cvm_oct_fill_hw_skbuff(int pool,int size,int elements) cvm_oct_fill_hw_skbuff() argument 47 cvm_oct_free_hw_skbuff(int pool,int size,int elements) cvm_oct_free_hw_skbuff() argument 77 cvm_oct_fill_hw_memory(int pool,int size,int elements) cvm_oct_fill_hw_memory() argument 114 cvm_oct_free_hw_memory(int pool,int size,int elements) cvm_oct_free_hw_memory() argument 137 cvm_oct_mem_fill_fpa(int pool,int size,int elements) cvm_oct_mem_fill_fpa() argument 148 cvm_oct_mem_empty_fpa(int pool,int size,int elements) cvm_oct_mem_empty_fpa() argument [all...] |
| /linux/drivers/gpu/drm/amd/display/dc/resource/dce80/ |
| H A D | dce80_resource.c | 832 static void dce80_resource_destruct(struct dce110_resource_pool *pool) in dce80_resource_destruct() argument 836 for (i = 0; i < pool->base.pipe_count; i++) { in dce80_resource_destruct() 837 if (pool->base.opps[i] != NULL) in dce80_resource_destruct() 838 dce110_opp_destroy(&pool->base.opps[i]); in dce80_resource_destruct() 840 if (pool->base.transforms[i] != NULL) in dce80_resource_destruct() 841 dce80_transform_destroy(&pool->base.transforms[i]); in dce80_resource_destruct() 843 if (pool->base.ipps[i] != NULL) in dce80_resource_destruct() 844 dce_ipp_destroy(&pool->base.ipps[i]); in dce80_resource_destruct() 846 if (pool->base.mis[i] != NULL) { in dce80_resource_destruct() 847 kfree(TO_DCE_MEM_INPUT(pool in dce80_resource_destruct() 901 dce80_destroy_resource_pool(struct resource_pool ** pool) dce80_destroy_resource_pool() argument 924 dce80_construct(uint8_t num_virtual_links,struct dc * dc,struct dce110_resource_pool * pool) dce80_construct() argument 1110 struct dce110_resource_pool *pool = dce80_create_resource_pool() local 1127 dce81_construct(uint8_t num_virtual_links,struct dc * dc,struct dce110_resource_pool * pool) dce81_construct() argument 1310 struct dce110_resource_pool *pool = dce81_create_resource_pool() local 1327 dce83_construct(uint8_t num_virtual_links,struct dc * dc,struct dce110_resource_pool * pool) dce83_construct() argument 1508 struct dce110_resource_pool *pool = dce83_create_resource_pool() local [all...] |
| /linux/drivers/gpu/drm/amd/display/dc/resource/dce60/ |
| H A D | dce60_resource.c | 825 static void dce60_resource_destruct(struct dce110_resource_pool *pool) in dce60_resource_destruct() argument 829 for (i = 0; i < pool->base.pipe_count; i++) { in dce60_resource_destruct() 830 if (pool->base.opps[i] != NULL) in dce60_resource_destruct() 831 dce110_opp_destroy(&pool->base.opps[i]); in dce60_resource_destruct() 833 if (pool->base.transforms[i] != NULL) in dce60_resource_destruct() 834 dce60_transform_destroy(&pool->base.transforms[i]); in dce60_resource_destruct() 836 if (pool->base.ipps[i] != NULL) in dce60_resource_destruct() 837 dce_ipp_destroy(&pool->base.ipps[i]); in dce60_resource_destruct() 839 if (pool->base.mis[i] != NULL) { in dce60_resource_destruct() 840 kfree(TO_DCE_MEM_INPUT(pool->base.mis[i])); in dce60_resource_destruct() [all …]
|
| /linux/include/linux/ |
| H A D | genalloc.h | 16 * available. If new memory is added to the pool a lock has to be 46 * @pool: the pool being allocated from 53 void *data, struct gen_pool *pool, 57 * General purpose special memory pool descriptor. 61 struct list_head chunks; /* list of chunks in this pool */ 71 * General purpose special memory pool chunk descriptor. 74 struct list_head next_chunk; /* next chunk in pool */ 98 extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long); 102 static inline int gen_pool_add_virt(struct gen_pool *pool, unsigned long addr, in gen_pool_add_virt() argument 105 return gen_pool_add_owner(pool, addr, phys, size, nid, NULL); in gen_pool_add_virt() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | irq_affinity.c | 8 static void cpu_put(struct mlx5_irq_pool *pool, int cpu) in cpu_put() argument 10 pool->irqs_per_cpu[cpu]--; in cpu_put() 13 static void cpu_get(struct mlx5_irq_pool *pool, int cpu) in cpu_get() argument 15 pool->irqs_per_cpu[cpu]++; in cpu_get() 19 static int cpu_get_least_loaded(struct mlx5_irq_pool *pool, in cpu_get_least_loaded() argument 27 if (!pool->irqs_per_cpu[cpu]) { in cpu_get_least_loaded() 33 if (pool->irqs_per_cpu[cpu] < pool->irqs_per_cpu[best_cpu]) in cpu_get_least_loaded() 38 mlx5_core_err(pool->dev, "NO online CPUs in req_mask (%*pbl)\n", in cpu_get_least_loaded() 42 pool in cpu_get_least_loaded() 48 irq_pool_request_irq(struct mlx5_irq_pool * pool,struct irq_affinity_desc * af_desc) irq_pool_request_irq() argument 97 irq_pool_find_least_loaded(struct mlx5_irq_pool * pool,const struct cpumask * req_mask) irq_pool_find_least_loaded() argument 137 mlx5_irq_affinity_request(struct mlx5_core_dev * dev,struct mlx5_irq_pool * pool,struct irq_affinity_desc * af_desc) mlx5_irq_affinity_request() argument 189 struct mlx5_irq_pool *pool = mlx5_irq_get_pool(irq); mlx5_irq_affinity_irq_release() local [all...] |
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_cnt.c | 24 spinlock_t counter_pool_lock; /* Protects counter pool allocations */ 54 struct mlxsw_sp_counter_pool *pool = mlxsw_sp->counter_pool; in mlxsw_sp_counter_sub_pools_init() local 62 for (i = 0; i < pool->sub_pools_count; i++) { in mlxsw_sp_counter_sub_pools_init() 63 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_init() 89 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_init() 99 struct mlxsw_sp_counter_pool *pool = mlxsw_sp->counter_pool; in mlxsw_sp_counter_sub_pools_fini() local 104 for (i = 0; i < pool->sub_pools_count; i++) { in mlxsw_sp_counter_sub_pools_fini() 105 sub_pool = &pool->sub_pools[i]; in mlxsw_sp_counter_sub_pools_fini() 115 const struct mlxsw_sp_counter_pool *pool = priv; in mlxsw_sp_counter_pool_occ_get() local 117 return atomic_read(&pool->active_entries_count); in mlxsw_sp_counter_pool_occ_get() [all …]
|