Lines Matching refs:nr_pages
858 for (i = 0; i < rmem->nr_pages; i++) { in bnxt_free_ring()
902 if ((rmem->nr_pages > 1 || rmem->depth > 0) && !rmem->pg_tbl.idi_vaddr) { in bnxt_alloc_ring()
903 size_t pg_tbl_size = rmem->nr_pages * 8; in bnxt_alloc_ring()
913 for (i = 0; i < rmem->nr_pages; i++) { in bnxt_alloc_ring()
925 if (rmem->nr_pages > 1 || rmem->depth > 0) { in bnxt_alloc_ring()
926 if (i == rmem->nr_pages - 2 && in bnxt_alloc_ring()
929 else if (i == rmem->nr_pages - 1 && in bnxt_alloc_ring()
978 ctx_pg->nr_pages = DIV_ROUND_UP(mem_size, BNXT_PAGE_SIZE); in bnxt_alloc_ctx_pg_tbls()
979 if (ctx_pg->nr_pages > MAX_CTX_TOTAL_PAGES) { in bnxt_alloc_ctx_pg_tbls()
980 ctx_pg->nr_pages = 0; in bnxt_alloc_ctx_pg_tbls()
983 if (ctx_pg->nr_pages > MAX_CTX_PAGES || depth > 1) { in bnxt_alloc_ctx_pg_tbls()
991 nr_tbls = DIV_ROUND_UP(ctx_pg->nr_pages, MAX_CTX_PAGES); in bnxt_alloc_ctx_pg_tbls()
992 rmem->nr_pages = nr_tbls; in bnxt_alloc_ctx_pg_tbls()
1006 rmem->nr_pages = MAX_CTX_PAGES; in bnxt_alloc_ctx_pg_tbls()
1009 int rem = ctx_pg->nr_pages % MAX_CTX_PAGES; in bnxt_alloc_ctx_pg_tbls()
1012 rmem->nr_pages = rem; in bnxt_alloc_ctx_pg_tbls()
1019 rmem->nr_pages = DIV_ROUND_UP(mem_size, BNXT_PAGE_SIZE); in bnxt_alloc_ctx_pg_tbls()
1020 if (rmem->nr_pages > 1 || depth) in bnxt_alloc_ctx_pg_tbls()
1033 if (rmem->depth > 1 || ctx_pg->nr_pages > MAX_CTX_PAGES || in bnxt_free_ctx_pg_tbls()
1035 int i, nr_tbls = rmem->nr_pages; in bnxt_free_ctx_pg_tbls()
1054 ctx_pg->nr_pages = 0; in bnxt_free_ctx_pg_tbls()