Lines Matching +full:dma +full:- +full:safe +full:- +full:map

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * kmalloc/kfree interface. Uses for this includes on-device special
8 * It is safe to use the allocator in NMI handlers and other special
21 * On architectures that don't have NMI-safe cmpxchg implementation,
41 * @map: Pointer to bitmap
48 typedef unsigned long (*genpool_algo_t)(unsigned long *map,
108 * gen_pool_add - add a new chunk of special memory to the pool
113 * allocated on, or -1
117 * Returns 0 on success or a -ve errno on failure.
122 return gen_pool_add_virt(pool, addr, -1, size, nid); in gen_pool_add()
131 return gen_pool_alloc_algo_owner(pool, size, pool->algo, pool->data, in gen_pool_alloc_owner()
142 * gen_pool_alloc - allocate special memory from the pool
147 * Uses the pool allocation function (with first-fit algorithm by default).
149 * NMI-safe cmpxchg implementation.
153 return gen_pool_alloc_algo(pool, size, pool->algo, pool->data); in gen_pool_alloc()
157 dma_addr_t *dma);
159 dma_addr_t *dma, genpool_algo_t algo, void *data);
161 dma_addr_t *dma, int align);
162 extern void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
164 dma_addr_t *dma, genpool_algo_t algo, void *data);
166 dma_addr_t *dma, int align);
183 extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size,
187 extern unsigned long gen_pool_fixed_alloc(unsigned long *map,
191 extern unsigned long gen_pool_first_fit_align(unsigned long *map,
196 extern unsigned long gen_pool_first_fit_order_align(unsigned long *map,
200 extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,