mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 15:19:18 +08:00
parent
95fe5b1f46
commit
a7d252c645
@ -571,6 +571,11 @@ static int dpaa_bp_alloc_pool(struct dpaa_bp *dpaa_bp)
|
|||||||
|
|
||||||
dpaa_bp->bpid = (u8)bman_get_bpid(dpaa_bp->pool);
|
dpaa_bp->bpid = (u8)bman_get_bpid(dpaa_bp->pool);
|
||||||
}
|
}
|
||||||
|
#ifdef __rtems__
|
||||||
|
else {
|
||||||
|
dpaa_bp->pool = bman_new_pool_for_bpid(dpaa_bp->bpid);
|
||||||
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
if (dpaa_bp->seed_cb) {
|
if (dpaa_bp->seed_cb) {
|
||||||
err = dpaa_bp->seed_cb(dpaa_bp);
|
err = dpaa_bp->seed_cb(dpaa_bp);
|
||||||
|
@ -720,6 +720,17 @@ err:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(bman_new_pool);
|
EXPORT_SYMBOL(bman_new_pool);
|
||||||
|
#ifdef __rtems__
|
||||||
|
struct bman_pool *
|
||||||
|
bman_new_pool_for_bpid(u8 bpid)
|
||||||
|
{
|
||||||
|
struct bman_pool *pool;
|
||||||
|
|
||||||
|
pool = malloc(sizeof(*pool), M_KMALLOC, M_WAITOK | M_ZERO);
|
||||||
|
pool->bpid = bpid;
|
||||||
|
return (pool);
|
||||||
|
}
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
void bman_free_pool(struct bman_pool *pool)
|
void bman_free_pool(struct bman_pool *pool)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +86,9 @@ struct bman_pool;
|
|||||||
* Creates a pool object, and returns a reference to it or NULL on error.
|
* Creates a pool object, and returns a reference to it or NULL on error.
|
||||||
*/
|
*/
|
||||||
struct bman_pool *bman_new_pool(void);
|
struct bman_pool *bman_new_pool(void);
|
||||||
|
#ifdef __rtems__
|
||||||
|
struct bman_pool *bman_new_pool_for_bpid(u8 bpid);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bman_free_pool - Deallocates a Buffer Pool object
|
* bman_free_pool - Deallocates a Buffer Pool object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user