1 /* SPDX-License-Identifier: GPL-2.0 */
6 /* Capacity of the pool */
8 /* Size of the buffers managed */
10 /* Number of buffers currently used by this pool */
12 /* constructor called during alocation */
13 int (*construct
)(struct hwbm_pool
*bm_pool
, void *buf
);
14 /* protect acces to the buffer counter*/
20 void hwbm_buf_free(struct hwbm_pool
*bm_pool
, void *buf
);
21 int hwbm_pool_refill(struct hwbm_pool
*bm_pool
, gfp_t gfp
);
22 int hwbm_pool_add(struct hwbm_pool
*bm_pool
, unsigned int buf_num
, gfp_t gfp
);
24 void hwbm_buf_free(struct hwbm_pool
*bm_pool
, void *buf
) {}
25 int hwbm_pool_refill(struct hwbm_pool
*bm_pool
, gfp_t gfp
) { return 0; }
26 int hwbm_pool_add(struct hwbm_pool
*bm_pool
, unsigned int buf_num
, gfp_t gfp
)
28 #endif /* CONFIG_HWBM */