Lines Matching refs:nents
40 static inline unsigned int sg_pool_index(unsigned short nents) in sg_pool_index() argument
44 BUG_ON(nents > SG_CHUNK_SIZE); in sg_pool_index()
46 if (nents <= 8) in sg_pool_index()
49 index = get_count_order(nents) - 3; in sg_pool_index()
54 static void sg_pool_free(struct scatterlist *sgl, unsigned int nents) in sg_pool_free() argument
58 sgp = sg_pools + sg_pool_index(nents); in sg_pool_free()
62 static struct scatterlist *sg_pool_alloc(unsigned int nents, gfp_t gfp_mask) in sg_pool_alloc() argument
66 sgp = sg_pools + sg_pool_index(nents); in sg_pool_alloc()
112 int sg_alloc_table_chained(struct sg_table *table, int nents, in sg_alloc_table_chained() argument
117 BUG_ON(!nents); in sg_alloc_table_chained()
120 if (nents <= nents_first_chunk) { in sg_alloc_table_chained()
121 table->nents = table->orig_nents = nents; in sg_alloc_table_chained()
122 sg_init_table(table->sgl, nents); in sg_alloc_table_chained()
133 ret = __sg_alloc_table(table, nents, SG_CHUNK_SIZE, in sg_alloc_table_chained()