Lines Matching refs:sgl

91  * @sgl:	First entry in the scatterlist
98 * Note that the @sgl@ pointer passed in need not be the first one,
100 * exist from @sgl@.
103 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents)
108 for_each_sg(sgl, sg, nents, i)
118 * @sgl: The SG table
126 void sg_init_table(struct scatterlist *sgl, unsigned int nents)
128 memset(sgl, 0, sizeof(*sgl) * nents);
129 sg_init_marker(sgl, nents);
199 struct scatterlist *sgl, *next;
202 if (unlikely(!table->sgl))
205 sgl = table->sgl;
217 next = sg_chain_ptr(&sgl[curr_max_ents - 1]);
229 free_fn(sgl, alloc_size);
230 sgl = next;
234 table->sgl = NULL;
346 table->sgl = sg;
410 table->sgt.sgl = new_sg;
615 struct scatterlist *sgl, *sg;
631 sgl = kmalloc_array(nalloc, sizeof(struct scatterlist),
633 if (!sgl)
636 sg_init_table(sgl, nalloc);
637 sg = sgl;
642 sgl_free_order(sgl, order);
653 return sgl;
674 * @sgl: Scatterlist with one or more elements
685 void sgl_free_n_order(struct scatterlist *sgl, int nents, int order)
691 for_each_sg(sgl, sg, nents, i) {
698 kfree(sgl);
704 * @sgl: Scatterlist with one or more elements
707 void sgl_free_order(struct scatterlist *sgl, int order)
709 sgl_free_n_order(sgl, INT_MAX, order);
715 * @sgl: Scatterlist with one or more elements
717 void sgl_free(struct scatterlist *sgl)
719 sgl_free_order(sgl, 0);
790 * @sgl: sg list to iterate over
800 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
805 __sg_page_iter_start(&miter->piter, sgl, nents, 0);
951 * @sgl: The SG list
962 size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
974 sg_miter_start(&miter, sgl, nents, sg_flags);
1000 * @sgl: The SG list
1008 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents,
1011 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, 0, false);
1017 * @sgl: The SG list
1025 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents,
1028 return sg_copy_buffer(sgl, nents, buf, buflen, 0, true);
1034 * @sgl: The SG list
1043 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents,
1046 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, skip, false);
1052 * @sgl: The SG list
1061 size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents,
1064 return sg_copy_buffer(sgl, nents, buf, buflen, skip, true);
1070 * @sgl: The SG list
1077 size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents,
1084 sg_miter_start(&miter, sgl, nents, sg_flags);
1113 struct scatterlist *sg = sgtable->sgl + sgtable->nents;
1120 pages = (void *)sgtable->sgl +
1153 unpin_user_page(sg_page(&sgtable->sgl[--sgtable->nents]));
1168 struct scatterlist *sg = sgtable->sgl + sgtable->nents;
1214 struct scatterlist *sg = sgtable->sgl + sgtable->nents;
1274 struct scatterlist *sg = sgtable->sgl + sgtable->nents;