Lines Matching refs:hwbm_pool
93 int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) in mvneta_bm_construct() argument
96 (struct mvneta_bm_pool *)hwbm_pool->priv; in mvneta_bm_construct()
122 size_bytes = sizeof(u32) * bm_pool->hwbm_pool.size; in mvneta_bm_pool_create()
183 struct hwbm_pool *hwbm_pool = &new_pool->hwbm_pool; in mvneta_bm_pool_use() local
188 hwbm_pool->frag_size = in mvneta_bm_pool_use()
191 hwbm_pool->construct = mvneta_bm_construct; in mvneta_bm_pool_use()
192 hwbm_pool->priv = new_pool; in mvneta_bm_pool_use()
193 mutex_init(&hwbm_pool->buf_lock); in mvneta_bm_pool_use()
204 num = hwbm_pool_add(hwbm_pool, hwbm_pool->size); in mvneta_bm_pool_use()
205 if (num != hwbm_pool->size) { in mvneta_bm_pool_use()
207 new_pool->id, num, hwbm_pool->size); in mvneta_bm_pool_use()
228 for (i = 0; i < bm_pool->hwbm_pool.buf_num; i++) { in mvneta_bm_bufs_free()
247 hwbm_buf_free(&bm_pool->hwbm_pool, vaddr); in mvneta_bm_bufs_free()
253 bm_pool->hwbm_pool.buf_num -= i; in mvneta_bm_bufs_free()
261 struct hwbm_pool *hwbm_pool = &bm_pool->hwbm_pool; in mvneta_bm_pool_destroy() local
269 if (hwbm_pool->buf_num) in mvneta_bm_pool_destroy()
274 sizeof(u32) * hwbm_pool->size, in mvneta_bm_pool_destroy()
327 bm_pool->hwbm_pool.size = size; in mvneta_bm_pools_init()
330 bm_pool->hwbm_pool.size); in mvneta_bm_pools_init()