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*/
15 struct mutex buf_lock
;
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
);
24 static inline void hwbm_buf_free(struct hwbm_pool
*bm_pool
, void *buf
) {}
26 static inline int hwbm_pool_refill(struct hwbm_pool
*bm_pool
, gfp_t gfp
)
29 static inline int hwbm_pool_add(struct hwbm_pool
*bm_pool
,
32 #endif /* CONFIG_HWBM */