Lines Matching refs:nents
39 static inline unsigned int sg_pool_index(unsigned short nents) in sg_pool_index() argument
43 BUG_ON(nents > SG_CHUNK_SIZE); in sg_pool_index()
45 if (nents <= 8) in sg_pool_index()
48 index = get_count_order(nents) - 3; in sg_pool_index()
53 static void sg_pool_free(struct scatterlist *sgl, unsigned int nents) in sg_pool_free() argument
57 sgp = sg_pools + sg_pool_index(nents); in sg_pool_free()
61 static struct scatterlist *sg_pool_alloc(unsigned int nents, gfp_t gfp_mask) in sg_pool_alloc() argument
65 sgp = sg_pools + sg_pool_index(nents); in sg_pool_alloc()
98 int sg_alloc_table_chained(struct sg_table *table, int nents, in sg_alloc_table_chained() argument
103 BUG_ON(!nents); in sg_alloc_table_chained()
106 if (nents <= SG_CHUNK_SIZE) { in sg_alloc_table_chained()
107 table->nents = table->orig_nents = nents; in sg_alloc_table_chained()
108 sg_init_table(table->sgl, nents); in sg_alloc_table_chained()
113 ret = __sg_alloc_table(table, nents, SG_CHUNK_SIZE, in sg_alloc_table_chained()