Lines Matching full:pool

16  * available.  If new memory is added to the pool a lock has to be
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 */
97 extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long);
101 static inline int gen_pool_add_virt(struct gen_pool *pool, unsigned long addr, in gen_pool_add_virt() argument
104 return gen_pool_add_owner(pool, addr, phys, size, nid, NULL); in gen_pool_add_virt()
108 * gen_pool_add - add a new chunk of special memory to the pool
109 * @pool: pool to add new memory chunk to
110 * @addr: starting address of memory chunk to add to pool
111 * @size: size in bytes of the memory chunk to add to pool
115 * Add a new chunk of special memory to the specified pool.
119 static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr, in gen_pool_add() argument
122 return gen_pool_add_virt(pool, addr, -1, size, nid); in gen_pool_add()
125 unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size,
128 static inline unsigned long gen_pool_alloc_owner(struct gen_pool *pool, in gen_pool_alloc_owner() argument
131 return gen_pool_alloc_algo_owner(pool, size, pool->algo, pool->data, in gen_pool_alloc_owner()
135 static inline unsigned long gen_pool_alloc_algo(struct gen_pool *pool, in gen_pool_alloc_algo() argument
138 return gen_pool_alloc_algo_owner(pool, size, algo, data, NULL); in gen_pool_alloc_algo()
142 * gen_pool_alloc - allocate special memory from the pool
143 * @pool: pool to allocate from
144 * @size: number of bytes to allocate from the pool
146 * Allocate the requested number of bytes from the specified pool.
147 * Uses the pool allocation function (with first-fit algorithm by default).
151 static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) in gen_pool_alloc() argument
153 return gen_pool_alloc_algo(pool, size, pool->algo, pool->data); in gen_pool_alloc()
156 extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size,
158 extern void *gen_pool_dma_alloc_algo(struct gen_pool *pool, size_t size,
160 extern void *gen_pool_dma_alloc_align(struct gen_pool *pool, size_t size,
162 extern void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma);
163 extern void *gen_pool_dma_zalloc_algo(struct gen_pool *pool, size_t size,
165 extern void *gen_pool_dma_zalloc_align(struct gen_pool *pool, size_t size,
167 extern void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr,
169 static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr, in gen_pool_free() argument
172 gen_pool_free_owner(pool, addr, size, NULL); in gen_pool_free()
180 extern void gen_pool_set_algo(struct gen_pool *pool, genpool_algo_t algo,
185 struct gen_pool *pool, unsigned long start_addr);
189 void *data, struct gen_pool *pool, unsigned long start_addr);
193 void *data, struct gen_pool *pool, unsigned long start_addr);
198 void *data, struct gen_pool *pool, unsigned long start_addr);
202 struct gen_pool *pool, unsigned long start_addr);
209 extern bool gen_pool_has_addr(struct gen_pool *pool, unsigned long start,