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);
101 * @nents: Number of entries in sg list
106 * Allocate and chain SGLs in an sg table. If @nents@ is larger than
112 int sg_alloc_table_chained(struct sg_table *table, int nents,
117 BUG_ON(!nents);
120 if (nents <= nents_first_chunk) {
121 table->nents = table->orig_nents = nents;
122 sg_init_table(table->sgl, nents);
133 ret = __sg_alloc_table(table, nents, SG_CHUNK_SIZE,