Lines Matching refs:scatterlist
23 struct scatterlist *sg_next(struct scatterlist *sg) in sg_next()
45 int sg_nents(struct scatterlist *sg) in sg_nents()
68 int sg_nents_for_len(struct scatterlist *sg, u64 len) in sg_nents_for_len()
101 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents) in sg_last()
103 struct scatterlist *sg, *ret = NULL; in sg_last()
124 void sg_init_table(struct scatterlist *sgl, unsigned int nents) in sg_init_table()
138 void sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) in sg_init_one()
149 static struct scatterlist *sg_kmalloc(unsigned int nents, gfp_t gfp_mask) in sg_kmalloc()
165 return kmalloc_array(nents, sizeof(struct scatterlist), in sg_kmalloc()
169 static void sg_kfree(struct scatterlist *sg, unsigned int nents) in sg_kfree()
195 struct scatterlist *sgl, *next; in __sg_free_table()
267 unsigned int max_ents, struct scatterlist *first_chunk, in __sg_alloc_table()
271 struct scatterlist *sg, *prv; in __sg_alloc_table()
368 static struct scatterlist *get_next_sg(struct sg_table *table, in get_next_sg()
369 struct scatterlist *cur, in get_next_sg()
373 struct scatterlist *new_sg, *next_sg; in get_next_sg()
428 struct scatterlist *__sg_alloc_table_from_pages(struct sg_table *sgt, in __sg_alloc_table_from_pages()
431 struct scatterlist *prv, unsigned int left_pages, in __sg_alloc_table_from_pages()
436 struct scatterlist *s = prv; in __sg_alloc_table_from_pages()
567 struct scatterlist *sgl_alloc_order(unsigned long long length, in sgl_alloc_order()
571 struct scatterlist *sgl, *sg; in sgl_alloc_order()
587 sgl = kmalloc_array(nalloc, sizeof(struct scatterlist), in sgl_alloc_order()
621 struct scatterlist *sgl_alloc(unsigned long long length, gfp_t gfp, in sgl_alloc()
641 void sgl_free_n_order(struct scatterlist *sgl, int nents, int order) in sgl_free_n_order()
643 struct scatterlist *sg; in sgl_free_n_order()
663 void sgl_free_order(struct scatterlist *sgl, int order) in sgl_free_order()
673 void sgl_free(struct scatterlist *sgl) in sgl_free()
682 struct scatterlist *sglist, unsigned int nents, in __sg_page_iter_start()
693 static int sg_page_count(struct scatterlist *sg) in sg_page_count()
717 static int sg_dma_page_count(struct scatterlist *sg) in sg_dma_page_count()
755 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, in sg_miter_start()
769 struct scatterlist *sg; in sg_miter_get_next_page()
921 size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, in sg_copy_buffer()
967 size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, in sg_copy_from_buffer()
984 size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, in sg_copy_to_buffer()
1002 size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, in sg_pcopy_from_buffer()
1020 size_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, in sg_pcopy_to_buffer()
1036 size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents, in sg_zero_buffer()