Lines Matching defs:nents
40 static inline unsigned int sg_pool_index(unsigned short nents)
44 BUG_ON(nents > SG_CHUNK_SIZE);
46 if (nents <= 8)
49 index = get_count_order(nents) - 3;
54 static void sg_pool_free(struct scatterlist *sgl, unsigned int nents)
58 sgp = sg_pools + sg_pool_index(nents);
62 static struct scatterlist *sg_pool_alloc(unsigned int nents, gfp_t gfp_mask)
66 sgp = sg_pools + sg_pool_index(nents);
100 * @nents: Number of entries in sg list
105 * Allocate and chain SGLs in an sg table. If @nents@ is larger than
111 int sg_alloc_table_chained(struct sg_table *table, int nents,
116 BUG_ON(!nents);
119 if (nents <= nents_first_chunk) {
120 table->nents = table->orig_nents = nents;
121 sg_init_table(table->sgl, nents);
132 ret = __sg_alloc_table(table, nents, SG_CHUNK_SIZE,