Lines Matching refs:sgl
89 * @sgl: First entry in the scatterlist
96 * Note that the @sgl@ pointer passed in need not be the first one,
98 * exist from @sgl@.
101 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents)
106 for_each_sg(sgl, sg, nents, i)
116 * @sgl: The SG table
124 void sg_init_table(struct scatterlist *sgl, unsigned int nents)
126 memset(sgl, 0, sizeof(*sgl) * nents);
127 sg_init_marker(sgl, nents);
195 struct scatterlist *sgl, *next;
198 if (unlikely(!table->sgl))
201 sgl = table->sgl;
213 next = sg_chain_ptr(&sgl[curr_max_ents - 1]);
225 free_fn(sgl, alloc_size);
226 sgl = next;
230 table->sgl = NULL;
327 table->sgl = sg;
392 table->sgl = new_sg;
571 struct scatterlist *sgl, *sg;
587 sgl = kmalloc_array(nalloc, sizeof(struct scatterlist),
589 if (!sgl)
592 sg_init_table(sgl, nalloc);
593 sg = sgl;
598 sgl_free_order(sgl, order);
609 return sgl;
630 * @sgl: Scatterlist with one or more elements
641 void sgl_free_n_order(struct scatterlist *sgl, int nents, int order)
647 for_each_sg(sgl, sg, nents, i) {
654 kfree(sgl);
660 * @sgl: Scatterlist with one or more elements
663 void sgl_free_order(struct scatterlist *sgl, int order)
665 sgl_free_n_order(sgl, INT_MAX, order);
671 * @sgl: Scatterlist with one or more elements
673 void sgl_free(struct scatterlist *sgl)
675 sgl_free_order(sgl, 0);
746 * @sgl: sg list to iterate over
755 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
760 __sg_page_iter_start(&miter->piter, sgl, nents, 0);
910 * @sgl: The SG list
921 size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
933 sg_miter_start(&miter, sgl, nents, sg_flags);
959 * @sgl: The SG list
967 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents,
970 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, 0, false);
976 * @sgl: The SG list
984 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
987 return sg_copy_buffer(sgl, nents, buf, buflen, 0, true);
993 * @sgl: The SG list
1002 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents,
1005 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, skip, false);
1011 * @sgl: The SG list
1020 size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents,
1023 return sg_copy_buffer(sgl, nents, buf, buflen, skip, true);
1029 * @sgl: The SG list
1036 size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents,
1043 sg_miter_start(&miter, sgl, nents, sg_flags);