Lines Matching refs:pool
62 * Setup a FPA pool to control a new block of memory. The
65 * @param pool Pool to initialize
66 * 0 <= pool < 8
67 * @param name Constant character string to name this pool.
77 int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer,
86 if (pool >= CVMX_FPA_NUM_POOLS)
88 cvmx_dprintf("ERROR: cvmx_fpa_setup_pool: Illegal pool!\n");
104 cvmx_fpa_pool_info[pool].name = name;
105 cvmx_fpa_pool_info[pool].size = block_size;
106 cvmx_fpa_pool_info[pool].starting_element_count = num_blocks;
107 cvmx_fpa_pool_info[pool].base = buffer;
112 cvmx_fpa_free(ptr, pool, 0);
119 * Shutdown a Memory pool and validate that it had all of
122 * using the pool. Most like you will want to have called
127 * @param pool Pool to shutdown
133 uint64_t cvmx_fpa_shutdown_pool(uint64_t pool)
137 int expected_count = cvmx_fpa_pool_info[pool].starting_element_count;
138 uint64_t base = cvmx_ptr_to_phys(cvmx_fpa_pool_info[pool].base);
139 uint64_t finish = base + cvmx_fpa_pool_info[pool].size * expected_count;
145 void *ptr = cvmx_fpa_alloc(pool);
151 (((address - base) % cvmx_fpa_pool_info[pool].size) == 0))
157 cvmx_dprintf("ERROR: cvmx_fpa_shutdown_pool: Illegal address 0x%llx in pool %s(%d)\n",
158 (unsigned long long)address, cvmx_fpa_pool_info[pool].name, (int)pool);
166 cvmx_fpa_pool_info[pool].name, (int)pool, expected_count - count);
171 cvmx_fpa_pool_info[pool].name, (int)pool, count - expected_count);
177 cvmx_fpa_pool_info[pool].name, (int)pool, (unsigned long long)base, (unsigned long long)finish, (int)cvmx_fpa_pool_info[pool].size);
184 uint64_t cvmx_fpa_get_block_size(uint64_t pool)
186 switch (pool)