Lines Matching refs:table
205 void __sg_free_table(struct sg_table *table, unsigned int max_ents, in __sg_free_table() argument
210 if (unlikely(!table->sgl)) in __sg_free_table()
213 sgl = table->sgl; in __sg_free_table()
214 while (table->orig_nents) { in __sg_free_table()
215 unsigned int alloc_size = table->orig_nents; in __sg_free_table()
233 table->orig_nents -= sg_size; in __sg_free_table()
241 table->sgl = NULL; in __sg_free_table()
250 void sg_free_table(struct sg_table *table) in sg_free_table() argument
252 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); in sg_free_table()
275 int __sg_alloc_table(struct sg_table *table, unsigned int nents, in __sg_alloc_table() argument
282 memset(table, 0, sizeof(*table)); in __sg_alloc_table()
318 table->nents = ++table->orig_nents; in __sg_alloc_table()
324 table->nents = table->orig_nents += sg_size; in __sg_alloc_table()
333 table->sgl = sg; in __sg_alloc_table()
359 int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) in sg_alloc_table() argument
363 ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, in sg_alloc_table()
366 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); in sg_alloc_table()