Lines Matching full:pool
31 * Interface to the hardware Free Pool Allocator.
79 * Structure describing the current state of a FPA pool.
88 /* The number of elements in the pool at creation */
101 * Return the name of the pool
103 * @pool: Pool to get the name of
106 static inline const char *cvmx_fpa_get_name(uint64_t pool) in cvmx_fpa_get_name() argument
108 return cvmx_fpa_pool_info[pool].name; in cvmx_fpa_get_name()
112 * Return the base of the pool
114 * @pool: Pool to get the base of
117 static inline void *cvmx_fpa_get_base(uint64_t pool) in cvmx_fpa_get_base() argument
119 return cvmx_fpa_pool_info[pool].base; in cvmx_fpa_get_base()
123 * Check if a pointer belongs to an FPA pool. Return non-zero
125 * an FPA pool.
127 * @pool: Pool to check
129 * Returns Non-zero if pointer is in the pool. Zero if not
131 static inline int cvmx_fpa_is_member(uint64_t pool, void *ptr) in cvmx_fpa_is_member() argument
133 return ((ptr >= cvmx_fpa_pool_info[pool].base) && in cvmx_fpa_is_member()
135 ((char *)(cvmx_fpa_pool_info[pool].base)) + in cvmx_fpa_is_member()
136 cvmx_fpa_pool_info[pool].size * in cvmx_fpa_is_member()
137 cvmx_fpa_pool_info[pool].starting_element_count)); in cvmx_fpa_is_member()
182 * @pool: Pool to get the block from
185 static inline void *cvmx_fpa_alloc(uint64_t pool) in cvmx_fpa_alloc() argument
188 cvmx_read_csr(CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool))); in cvmx_fpa_alloc()
200 * @pool: Pool to get the block from
202 static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) in cvmx_fpa_async_alloc() argument
212 data.s.did = CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool); in cvmx_fpa_async_alloc()
218 * Free a block allocated with a FPA pool. Does NOT provide memory
222 * @pool: Pool to put it in
226 static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, in cvmx_fpa_free_nosync() argument
232 CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); in cvmx_fpa_free_nosync()
240 * Free a block allocated with a FPA pool. Provides required memory
244 * @pool: Pool to put it in
248 static inline void cvmx_fpa_free(void *ptr, uint64_t pool, in cvmx_fpa_free() argument
254 CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); in cvmx_fpa_free()
267 * Shutdown a Memory pool and validate that it had all of
270 * using the pool.
272 * @pool: Pool to shutdown
277 extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool);
280 * Get the size of blocks controlled by the pool
283 * @pool: Pool to access
286 uint64_t cvmx_fpa_get_block_size(uint64_t pool);