Lines Matching defs:pool

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)
108 return cvmx_fpa_pool_info[pool].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)
119 return cvmx_fpa_pool_info[pool].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)
133 return ((ptr >= cvmx_fpa_pool_info[pool].base) &&
135 ((char *)(cvmx_fpa_pool_info[pool].base)) +
136 cvmx_fpa_pool_info[pool].size *
137 cvmx_fpa_pool_info[pool].starting_element_count));
182 * @pool: Pool to get the block from
185 static inline void *cvmx_fpa_alloc(uint64_t pool)
188 cvmx_read_csr(CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)));
200 * @pool: Pool to get the block from
202 static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool)
212 data.s.did = CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool);
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,
232 CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool));
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,
254 CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool));
267 * Setup a FPA pool to control a new block of memory.
268 * This can only be called once per pool. Make sure proper
271 * @pool: Pool to initialize
272 * 0 <= pool < 8
273 * @name: Constant character string to name this pool.
283 extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer,
287 * Shutdown a Memory pool and validate that it had all of
290 * using the pool.
292 * @pool: Pool to shutdown
297 extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool);
300 * Get the size of blocks controlled by the pool
303 * @pool: Pool to access
306 uint64_t cvmx_fpa_get_block_size(uint64_t pool);