Home
last modified time | relevance | path

Searched +full:dma +full:- +full:pool (Results 1 – 25 of 646) sorted by relevance

12345678910>>...26

/Linux-v6.1/mm/
Ddmapool.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * DMA Pool allocator
9 * This allocator returns small blocks of a given size which are DMA-able by
14 * The current design of this allocator is fairly simple. The pool is
15 * represented by the 'struct dma_pool' which keeps a doubly-linked list of
17 * least 'size' bytes. Free blocks are tracked in an unsorted singly-linked
23 #include <linux/dma-mapping.h>
43 struct dma_pool { /* the pool */
57 dma_addr_t dma; member
71 struct dma_pool *pool; in pools_show() local
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/reserved-memory/
Dshared-dma-pool.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/reserved-memory/shared-dma-pool.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: /reserved-memory DMA pool node bindings
10 - devicetree-spec@vger.kernel.org
13 - $ref: "reserved-memory.yaml"
18 - const: shared-dma-pool
21 pool of DMA buffers for a set of devices. It can be used by an
22 operating system to instantiate the necessary pool management
[all …]
/Linux-v6.1/lib/
Dgenalloc.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * kmalloc/kfree interface. Uses for this includes on-device special
16 * available. If new memory is added to the pool a lock has to be
21 * On architectures that don't have NMI-safe cmpxchg implementation,
26 * Copyright 2005 (C) Jes Sorensen <jes@trained-monkey.org>
40 return chunk->end_addr - chunk->start_addr + 1; in chunk_size()
51 return -EBUSY; in set_bits_ll()
66 return -EBUSY; in clear_bits_ll()
74 * bitmap_set_ll - set the specified number of bits at the specified position
79 * Set @nr bits start from @start in @map lock-lessly. Several users
[all …]
/Linux-v6.1/drivers/gpu/drm/ttm/
Dttm_pool.c1 // SPDX-License-Identifier: GPL-2.0 OR MIT
30 * Additional to that allocations from the DMA coherent API are pooled as well
35 #include <linux/dma-mapping.h>
50 * struct ttm_pool_dma - Helper object for coherent DMA mappings
52 * @addr: original DMA address returned for the mapping
62 MODULE_PARM_DESC(page_pool_size, "Number of pages in the WC/UC/DMA pool");
78 static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags, in ttm_pool_alloc_page() argument
82 struct ttm_pool_dma *dma; in ttm_pool_alloc_page() local
94 if (!pool->use_dma_alloc) { in ttm_pool_alloc_page()
97 p->private = order; in ttm_pool_alloc_page()
[all …]
/Linux-v6.1/drivers/net/ipa/
Dgsi_trans.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2022 Linaro Ltd.
12 #include <linux/dma-direction.h>
29 * struct gsi_trans - a GSI transaction
41 * @direction: DMA transfer direction (DMA_NONE for commands)
76 * gsi_trans_pool_init() - Initialize a pool of structures for transactions
77 * @pool: GSI transaction pool pointer
78 * @size: Size of elements in the pool
79 * @count: Minimum number of elements in the pool
[all …]
Dgsi_trans.c1 // SPDX-License-Identifier: GPL-2.0
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2022 Linaro Ltd.
12 #include <linux/dma-direction.h>
44 * transaction. If a buffer in an operation must be mapped for DMA, this is
75 __le64 addr; /* DMA address */
81 /* gsi_tre->flags mask values (in CPU byte order) */
87 int gsi_trans_pool_init(struct gsi_trans_pool *pool, size_t size, u32 count, in gsi_trans_pool_init() argument
93 return -EINVAL; in gsi_trans_pool_init()
95 return -EINVAL; in gsi_trans_pool_init()
[all …]
/Linux-v6.1/drivers/scsi/lpfc/
Dlpfc_mem.c4 * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term *
6 * Copyright (C) 2004-2014 Emulex. All rights reserved. *
9 * Portions Copyright (C) 2004-2005 Christoph Hellwig *
17 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
45 #define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */
46 #define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */
47 #define LPFC_DEVICE_DATA_POOL_SIZE 64 /* max elements in device data pool */
48 #define LPFC_RRQ_POOL_SIZE 256 /* max elements in non-DMA pool */
49 #define LPFC_MBX_POOL_SIZE 256 /* max elements in MBX non-DMA pool */
54 int max_xri = phba->sli4_hba.max_cfg_param.max_xri; in lpfc_mem_alloc_active_rrq_pool_s4()
[all …]
/Linux-v6.1/net/xdp/
Dxsk_buff_pool.c1 // SPDX-License-Identifier: GPL-2.0
11 void xp_add_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_add_xsk() argument
15 if (!xs->tx) in xp_add_xsk()
18 spin_lock_irqsave(&pool->xsk_tx_list_lock, flags); in xp_add_xsk()
19 list_add_rcu(&xs->tx_list, &pool->xsk_tx_list); in xp_add_xsk()
20 spin_unlock_irqrestore(&pool->xsk_tx_list_lock, flags); in xp_add_xsk()
23 void xp_del_xsk(struct xsk_buff_pool *pool, struct xdp_sock *xs) in xp_del_xsk() argument
27 if (!xs->tx) in xp_del_xsk()
30 spin_lock_irqsave(&pool->xsk_tx_list_lock, flags); in xp_del_xsk()
31 list_del_rcu(&xs->tx_list); in xp_del_xsk()
[all …]
/Linux-v6.1/net/core/
Dpage_pool.c1 /* SPDX-License-Identifier: GPL-2.0
16 #include <linux/dma-direction.h>
17 #include <linux/dma-mapping.h>
18 #include <linux/page-flags.h>
32 #define alloc_stat_inc(pool, __stat) (pool->alloc_stats.__stat++) argument
34 #define recycle_stat_inc(pool, __stat) \ argument
36 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
37 this_cpu_inc(s->__stat); \
40 #define recycle_stat_add(pool, __stat, val) \ argument
42 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
[all …]
/Linux-v6.1/drivers/media/platform/renesas/vsp1/
Dvsp1_dl.c1 // SPDX-License-Identifier: GPL-2.0+
3 * vsp1_dl.c -- R-Car VSP1 Display List
11 #include <linux/dma-mapping.h>
41 * struct vsp1_dl_ext_header - Extended display list header
43 * @pre_ext_dl_num_cmd: number of pre-extended command bodies to parse
45 * @pre_ext_dl_plist: start address of pre-extended display list bodies
46 * @post_ext_dl_num_cmd: number of post-extended command bodies to parse
47 * @post_ext_dl_plist: start address of post-extended display list bodies
54 * expecting 32-bit accesses. The flags are appropriate to the whole
79 * struct vsp1_pre_ext_dl_body - Pre Extended Display List Body
[all …]
/Linux-v6.1/arch/arm64/boot/dts/ti/
Dk3-j721e-som-p0.dtsi1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2019-2020 Texas Instruments Incorporated - https://www.ti.com/
6 /dts-v1/;
8 #include "k3-j721e.dtsi"
18 reserved_memory: reserved-memory {
19 #address-cells = <2>;
20 #size-cells = <2>;
26 no-map;
29 mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
30 compatible = "shared-dma-pool";
[all …]
Dk3-j7200-som-p0.dtsi1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/
6 /dts-v1/;
8 #include "k3-j7200.dtsi"
18 reserved_memory: reserved-memory {
19 #address-cells = <2>;
20 #size-cells = <2>;
26 no-map;
29 mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
30 compatible = "shared-dma-pool";
[all …]
/Linux-v6.1/include/net/
Dxsk_buff_pool.h1 /* SPDX-License-Identifier: GPL-2.0 */
9 #include <linux/dma-mapping.h>
24 dma_addr_t dma; member
26 struct xsk_buff_pool *pool; member
58 /* For performance reasons, each buff pool has its own array of dma_pages
87 * The low 12-bits of the addr will be 0 since this is the page address, so we
96 int xp_assign_dev(struct xsk_buff_pool *pool, struct net_device *dev,
98 int xp_assign_dev_shared(struct xsk_buff_pool *pool, struct xdp_sock *umem_xs,
100 int xp_alloc_tx_descs(struct xsk_buff_pool *pool, struct xdp_sock *xs);
101 void xp_destroy(struct xsk_buff_pool *pool);
[all …]
Dpage_pool.h1 /* SPDX-License-Identifier: GPL-2.0
12 * uses one-frame-per-page, but have fallbacks that act like the
19 * API keeps track of in-flight pages, in-order to let API user know
27 * will release the DMA mapping and in-flight state accounting. We
35 #include <linux/dma-direction.h>
37 #define PP_FLAG_DMA_MAP BIT(0) /* Should page_pool do the DMA
42 * DMA-synced-for-device according to
45 * Please note DMA-sync-for-CPU is still
57 * use-case. The NAPI budget is 64 packets. After a NAPI poll the RX
61 * Keeping room for more objects, is due to XDP_DROP use-case. As
[all …]
Dxdp_sock_drv.h1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Interface for implementing AF_XDP zero-copy support in drivers.
17 void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
18 bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
19 u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
20 void xsk_tx_release(struct xsk_buff_pool *pool);
23 void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool);
24 void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool);
25 void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool);
26 void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool);
[all …]
/Linux-v6.1/drivers/net/ethernet/ti/
Dk3-cppi-desc-pool.c1 // SPDX-License-Identifier: GPL-2.0
2 /* TI K3 CPPI5 descriptors pool API
4 * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com
10 #include <linux/dma-mapping.h>
15 #include "k3-cppi-desc-pool.h"
27 void k3_cppi_desc_pool_destroy(struct k3_cppi_desc_pool *pool) in k3_cppi_desc_pool_destroy() argument
29 if (!pool) in k3_cppi_desc_pool_destroy()
32 WARN(gen_pool_size(pool->gen_pool) != gen_pool_avail(pool->gen_pool), in k3_cppi_desc_pool_destroy()
34 gen_pool_size(pool->gen_pool), in k3_cppi_desc_pool_destroy()
35 gen_pool_avail(pool->gen_pool)); in k3_cppi_desc_pool_destroy()
[all …]
/Linux-v6.1/drivers/soc/ti/
Dknav_qmss_queue.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
12 #include <linux/dma-mapping.h>
42 * are to be re-defined
55 (kdev->instances + (idx << kdev->inst_shift))
58 list_for_each_entry_rcu(qh, &inst->handles, list, \
62 for (idx = 0, inst = kdev->instances; \
63 idx < (kdev)->num_queues_in_use; \
82 * @inst: - qmss queue instance like accumulator
93 if (atomic_read(&qh->notifier_enabled) <= 0) in knav_queue_notify()
[all …]
/Linux-v6.1/include/linux/
Dgenalloc.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * kmalloc/kfree interface. Uses for this includes on-device special
16 * available. If new memory is added to the pool a lock has to be
21 * On architectures that don't have NMI-safe cmpxchg implementation,
46 * @pool: the pool being allocated from
52 void *data, struct gen_pool *pool,
56 * General purpose special memory pool descriptor.
60 struct list_head chunks; /* list of chunks in this pool */
70 * General purpose special memory pool chunk descriptor.
73 struct list_head next_chunk; /* next chunk in pool */
[all …]
/Linux-v6.1/drivers/usb/core/
Dbuffer.c1 // SPDX-License-Identifier: GPL-2.0
3 * DMA memory management for framework level HCD code (hc_driver)
17 #include <linux/dma-mapping.h>
25 * DMA-Coherent Buffers
28 /* FIXME tune these based on pool statistics ... */
44 pool_max[0] = 0; /* Don't use this pool */ in usb_init_pool_max()
52 * hcd_buffer_create - initialize buffer pools
57 * Call this as part of initializing a host controller that uses the dma
58 * memory allocators. It initializes some pools of dma-coherent memory that
70 if (hcd->localmem_pool || !hcd_uses_dma(hcd)) in hcd_buffer_create()
[all …]
/Linux-v6.1/kernel/dma/
Dpool.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-map-ops.h>
9 #include <linux/dma-direct.h>
26 /* Dynamic background expansion when the atomic pool is near capacity */
71 end = cma_get_base(cma) + size - 1; in cma_in_zone()
79 static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size, in atomic_pool_expand() argument
85 int ret = -ENOMEM; in atomic_pool_expand()
87 /* Cannot allocate larger than MAX_ORDER-1 */ in atomic_pool_expand()
88 order = min(get_order(pool_size), MAX_ORDER-1); in atomic_pool_expand()
97 } while (!page && order-- > 0); in atomic_pool_expand()
[all …]
/Linux-v6.1/Documentation/networking/
Dpage_pool.rst1 .. SPDX-License-Identifier: GPL-2.0
4 Page Pool API
8 per-page, but it can fallback on the regular page allocator APIs.
22 release the DMA mapping and inflight state accounting.
27 .. code-block:: none
29 +------------------+
31 +------------------+
37 +--------------------------------------------+
39 +--------------------------------------------+
42 | Pool empty | Pool has entries
[all …]
/Linux-v6.1/drivers/scsi/megaraid/
Dmegaraid_ioctl.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Copyright (c) 2003-2004 LSI Logic Corporation.
31 * con_log() - console log routine
86 * struct uioc_t - the common ioctl packet structure
93 * @cmdbuf : Pointer to buffer - can point to mbox or plain data buffer
104 * @list : for kioc free pool list maintenance
106 * @buf_vaddr : dma pool buffer attached to kioc for data transfer
107 * @buf_paddr : physical address of the dma pool buffer
108 * @pool_index : index of the dma pool that @buf_vaddr is taken from
153 /* For on-stack uioc timers. */
[all …]
/Linux-v6.1/arch/arm/boot/dts/
Dstm32mp157a-microgea-stm32mp1.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * Copyright (c) STMicroelectronics 2019 - All Rights Reserved
9 compatible = "engicam,microgea-stm32mp1", "st,stm32mp157";
16 reserved-memory {
17 #address-cells = <1>;
18 #size-cells = <1>;
22 compatible = "shared-dma-pool";
24 no-map;
28 compatible = "shared-dma-pool";
30 no-map;
[all …]
/Linux-v6.1/drivers/net/ethernet/intel/ixgbe/
Dixgbe_xsk.c1 // SPDX-License-Identifier: GPL-2.0
14 bool xdp_on = READ_ONCE(adapter->xdp_prog); in ixgbe_xsk_pool()
15 int qid = ring->ring_idx; in ixgbe_xsk_pool()
17 if (!xdp_on || !test_bit(qid, adapter->af_xdp_zc_qps)) in ixgbe_xsk_pool()
20 return xsk_get_pool_from_qid(adapter->netdev, qid); in ixgbe_xsk_pool()
24 struct xsk_buff_pool *pool, in ixgbe_xsk_pool_enable() argument
27 struct net_device *netdev = adapter->netdev; in ixgbe_xsk_pool_enable()
31 if (qid >= adapter->num_rx_queues) in ixgbe_xsk_pool_enable()
32 return -EINVAL; in ixgbe_xsk_pool_enable()
34 if (qid >= netdev->real_num_rx_queues || in ixgbe_xsk_pool_enable()
[all …]
/Linux-v6.1/drivers/net/ethernet/intel/i40e/
Di40e_xsk.c1 // SPDX-License-Identifier: GPL-2.0
15 memset(rx_ring->rx_bi_zc, 0, in i40e_clear_rx_bi_zc()
16 sizeof(*rx_ring->rx_bi_zc) * rx_ring->count); in i40e_clear_rx_bi_zc()
21 return &rx_ring->rx_bi_zc[idx]; in i40e_rx_bi()
25 * i40e_realloc_rx_xdp_bi - reallocate SW ring for either XSK or normal buffer
27 * @pool_present: is pool for XSK present
35 size_t elem_size = pool_present ? sizeof(*rx_ring->rx_bi_zc) : in i40e_realloc_rx_xdp_bi()
36 sizeof(*rx_ring->rx_bi); in i40e_realloc_rx_xdp_bi()
37 void *sw_ring = kcalloc(rx_ring->count, elem_size, GFP_KERNEL); in i40e_realloc_rx_xdp_bi()
40 return -ENOMEM; in i40e_realloc_rx_xdp_bi()
[all …]

12345678910>>...26