• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/octeon-sdk/

Lines Matching defs:pool

82  * Structure describing the current state of a FPA pool.
89 uint64_t starting_element_count; /**< The number of elements in the pool at creation */
101 * Return the name of the pool
103 * @param 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 * @param 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 * @param pool Pool to check
129 * @return 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) &&
134 ((char*)ptr < ((char*)(cvmx_fpa_pool_info[pool].base)) + cvmx_fpa_pool_info[pool].size * cvmx_fpa_pool_info[pool].starting_element_count));
177 * @param pool Pool to get the block from
180 static inline void *cvmx_fpa_alloc(uint64_t pool)
185 address = cvmx_read_csr(CVMX_ADDR_DID(CVMX_FULL_DID(CVMX_OCT_DID_FPA,pool)));
190 if (cvmx_read_csr(CVMX_FPA_QUEX_AVAILABLE(pool)) > 0)
206 * @param pool Pool to get the block from
208 static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool)
217 data.s.did = CVMX_FULL_DID(CVMX_OCT_DID_FPA,pool);
228 * @param pool Pool the block came from. Must be the same value
233 static inline void *cvmx_fpa_async_alloc_finish(uint64_t scr_addr, uint64_t pool)
243 return cvmx_fpa_alloc(pool);
247 * Free a block allocated with a FPA pool.
251 * @param pool Pool to put it in
255 static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, uint64_t num_cache_lines)
259 newptr.sfilldidspace.didspace = CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA,pool));
266 * Free a block allocated with a FPA pool. Provides required memory
270 * @param pool Pool to put it in
274 static inline void cvmx_fpa_free(void *ptr, uint64_t pool, uint64_t num_cache_lines)
278 newptr.sfilldidspace.didspace = CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA,pool));
288 * Setup a FPA pool to control a new block of memory.
289 * This can only be called once per pool. Make sure proper
292 * @param pool Pool to initialize
293 * 0 <= pool < 8
294 * @param name Constant character string to name this pool.
304 extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer,
308 * Shutdown a Memory pool and validate that it had all of
311 * using the pool. Most like you will want to have called
316 * @param pool Pool to shutdown
322 extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool);
325 * Get the size of blocks controlled by the pool
328 * @param pool Pool to access
331 uint64_t cvmx_fpa_get_block_size(uint64_t pool);