提交 d863ca67 编写于 作者: C Christophe JAILLET 提交者: David S. Miller

octeontx2-af: Add a 'rvu_free_bitmap()' function

In order to match 'rvu_alloc_bitmap()', add a 'rvu_free_bitmap()' function
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7db8263a
...@@ -211,6 +211,11 @@ int rvu_alloc_bitmap(struct rsrc_bmap *rsrc) ...@@ -211,6 +211,11 @@ int rvu_alloc_bitmap(struct rsrc_bmap *rsrc)
return 0; return 0;
} }
void rvu_free_bitmap(struct rsrc_bmap *rsrc)
{
kfree(rsrc->bmap);
}
/* Get block LF's HW index from a PF_FUNC's block slot number */ /* Get block LF's HW index from a PF_FUNC's block slot number */
int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot) int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot)
{ {
......
...@@ -638,6 +638,7 @@ static inline bool is_rvu_fwdata_valid(struct rvu *rvu) ...@@ -638,6 +638,7 @@ static inline bool is_rvu_fwdata_valid(struct rvu *rvu)
} }
int rvu_alloc_bitmap(struct rsrc_bmap *rsrc); int rvu_alloc_bitmap(struct rsrc_bmap *rsrc);
void rvu_free_bitmap(struct rsrc_bmap *rsrc);
int rvu_alloc_rsrc(struct rsrc_bmap *rsrc); int rvu_alloc_rsrc(struct rsrc_bmap *rsrc);
void rvu_free_rsrc(struct rsrc_bmap *rsrc, int id); void rvu_free_rsrc(struct rsrc_bmap *rsrc, int id);
bool is_rsrc_free(struct rsrc_bmap *rsrc, int id); bool is_rsrc_free(struct rsrc_bmap *rsrc, int id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册