Home
last modified time | relevance | path

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

12345678910>>...31

/openbmc/linux/mm/
H A 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>
45 dma_addr_t dma; member
48 struct dma_pool { /* the pool */
66 dma_addr_t dma; member
[all …]
H A Ddmapool_test.c2 #include <linux/dma-map-ops.h>
3 #include <linux/dma-mapping.h>
12 dma_addr_t dma; member
31 static struct dma_pool *pool; variable
45 p[i].v = dma_pool_alloc(pool, GFP_KERNEL, in dmapool_test_alloc()
46 &p[i].dma); in dmapool_test_alloc()
52 dma_pool_free(pool, p[i].v, p[i].dma); in dmapool_test_alloc()
57 for (--i; i >= 0; i--) in dmapool_test_alloc()
58 dma_pool_free(pool, p[i].v, p[i].dma); in dmapool_test_alloc()
59 return -ENOMEM; in dmapool_test_alloc()
[all …]
/openbmc/linux/Documentation/devicetree/bindings/reserved-memory/
H A 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
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 …]
/openbmc/linux/lib/
H A 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>
42 return chunk->end_addr - chunk->start_addr + 1; in chunk_size()
52 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 …]
/openbmc/linux/drivers/gpu/drm/ttm/
H A 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>
51 * struct ttm_pool_dma - Helper object for coherent DMA mappings
53 * @addr: original DMA address returned for the mapping
63 MODULE_PARM_DESC(page_pool_size, "Number of pages in the WC/UC/DMA pool");
79 static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags, in ttm_pool_alloc_page() argument
83 struct ttm_pool_dma *dma; in ttm_pool_alloc_page() local
95 if (!pool->use_dma_alloc) { in ttm_pool_alloc_page()
96 p = alloc_pages_node(pool->nid, gfp_flags, order); in ttm_pool_alloc_page()
[all …]
/openbmc/linux/drivers/net/ipa/
H A 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 …]
H A 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
94 return -EINVAL; in gsi_trans_pool_init()
96 return -EINVAL; in gsi_trans_pool_init()
[all …]
/openbmc/linux/drivers/scsi/lpfc/
H A 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 …]
/openbmc/linux/net/xdp/
H A 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 …]
/openbmc/linux/drivers/media/platform/renesas/vsp1/
H A 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 …]
/openbmc/linux/net/core/
H A 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>
33 #define alloc_stat_inc(pool, __stat) (pool->alloc_stats.__stat++) argument
35 #define recycle_stat_inc(pool, __stat) \ argument
37 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
38 this_cpu_inc(s->__stat); \
41 #define recycle_stat_add(pool, __stat, val) \ argument
43 struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
[all …]
/openbmc/linux/include/net/page_pool/
H A Dhelpers.h1 /* SPDX-License-Identifier: GPL-2.0
12 * uses one frame per-page, but it can fallback on the
19 * The API keeps track of in-flight pages, in order to let API users know
22 * the page to a page_pool-aware object like skbs marked with
27 * release the DMA mapping and in-flight state accounting.
40 * Drivers that wish to harvest page pool stats and report them to users
42 * struct page_pool_stats call page_pool_get_stats to get stats for the specified pool.
44 bool page_pool_get_stats(struct page_pool *pool,
64 * page_pool_dev_alloc_pages() - allocate a page.
65 * @pool: pool from which to allocate
[all …]
H A Dtypes.h1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/dma-direction.h>
9 #define PP_FLAG_DMA_MAP BIT(0) /* Should page_pool do the DMA
14 * DMA-synced-for-device according to
17 * Please note DMA-sync-for-CPU is still
29 * use-case. The NAPI budget is 64 packets. After a NAPI poll the RX
33 * Keeping room for more objects, is due to XDP_DROP use-case. As
47 * struct page_pool_params - page pool parameters
52 * @dev: device, for DMA pre-mapping purposes
54 * @dma_dir: DMA mapping direction
[all …]
/openbmc/linux/include/net/
H A Dxsk_buff_pool.h1 /* SPDX-License-Identifier: GPL-2.0 */
9 #include <linux/dma-mapping.h>
27 dma_addr_t dma; member
29 struct xsk_buff_pool *pool; member
65 /* For performance reasons, each buff pool has its own array of dma_pages
94 * The low 12-bits of the addr will be 0 since this is the page address, so we
103 int xp_assign_dev(struct xsk_buff_pool *pool, struct net_device *dev,
105 int xp_assign_dev_shared(struct xsk_buff_pool *pool, struct xdp_sock *umem_xs,
107 int xp_alloc_tx_descs(struct xsk_buff_pool *pool, struct xdp_sock *xs);
108 void xp_destroy(struct xsk_buff_pool *pool);
[all …]
/openbmc/linux/arch/arm64/boot/dts/ti/
H A Dk3-j721e-som-p0.dtsi1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2019-2020 Texas Instruments Incorporated - https://www.ti.com/
8 /dts-v1/;
10 #include "k3-j721e.dtsi"
20 reserved_memory: reserved-memory {
21 #address-cells = <2>;
22 #size-cells = <2>;
28 no-map;
31 mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
32 compatible = "shared-dma-pool";
[all …]
H A Dk3-j784s4-evm.dts1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
8 /dts-v1/;
10 #include <dt-bindings/net/ti-dp83867.h>
11 #include <dt-bindings/gpio/gpio.h>
12 #include "k3-j784s4.dtsi"
15 compatible = "ti,j784s4-evm", "ti,j784s4";
19 stdout-path = "serial2:115200n8";
39 reserved_memory: reserved-memory {
40 #address-cells = <2>;
[all …]
H A Dk3-am642-tqma64xxl.dtsi1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/
4 * Copyright (c) 2022-2023 TQ-Systems GmbH <linux@ew.tq-group.com>, D-82229 Seefeld, Germany.
7 #include "k3-am642.dtsi"
18 /* 1G RAM - default variant */
23 reserved-memory {
24 #address-cells = <2>;
25 #size-cells = <2>;
31 no-map;
34 main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
[all …]
/openbmc/linux/drivers/net/ethernet/ti/
H A 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 …]
/openbmc/linux/drivers/soc/ti/
H A 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 …]
/openbmc/linux/include/linux/
H A 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 …]
/openbmc/linux/drivers/usb/core/
H A 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 …]
/openbmc/linux/kernel/dma/
H A Dswiotlb.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Dynamic DMA mapping support.
6 * I/O TLBs (aka DMA address translation hardware).
9 * Copyright (C) 2000, 2003 Hewlett-Packard Co
10 * David Mosberger-Tang <davidm@hpl.hp.com>
12 * 03/05/07 davidm Switch from PCI-DMA to generic device DMA API.
14 * unnecessary i-cache flushing.
27 #include <linux/dma-direct.h>
28 #include <linux/dma-map-ops.h>
33 #include <linux/iommu-helper.h>
[all …]
H A 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()
97 } while (!page && order-- > 0); in atomic_pool_expand()
113 * Memory in the atomic DMA pools must be unencrypted, the pools do not in atomic_pool_expand()
114 * shrink so no re-encryption occurs in dma_direct_free(). in atomic_pool_expand()
[all …]
/openbmc/linux/drivers/scsi/megaraid/
H A 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 …]
/openbmc/linux/arch/arm/boot/dts/st/
H A 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 …]

12345678910>>...31