Lines Matching refs:sg
17 struct scatterlist **sg,
20 int n = sg_nents(*sg);
24 new_sg = kmalloc_array(n, sizeof(*sg), GFP_KERNEL);
33 while (*sg && total) {
34 int len = (*sg)->length;
41 sg_set_page(tmp, sg_page(*sg), len, (*sg)->offset);
47 *sg = sg_next(*sg);
50 *sg = new_sg;
55 static int omap_crypto_copy_sgs(int total, int bs, struct scatterlist **sg,
73 scatterwalk_map_and_copy(buf, *sg, 0, total, 0);
83 *sg = new_sg;
88 static int omap_crypto_check_sg(struct scatterlist *sg, int total, int bs,
97 while (sg) {
100 if (!IS_ALIGNED(sg->offset, 4))
102 if (!IS_ALIGNED(sg->length, bs))
105 if (page_zonenum(sg_page(sg)) != ZONE_DMA)
109 len += sg->length;
110 sg = sg_next(sg);
125 int omap_crypto_align_sg(struct scatterlist **sg, int total, int bs,
136 ret = omap_crypto_check_sg(*sg, total, bs, flags);
139 ret = omap_crypto_copy_sgs(total, bs, sg, new_sg, flags);
144 ret = omap_crypto_copy_sg_lists(total, bs, sg, new_sg, flags);
150 sg_set_buf(new_sg, sg_virt(*sg), (*sg)->length);
197 void omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig,
210 buf = sg_virt(sg);
214 omap_crypto_copy_data(sg, orig, offset, len);
219 kfree(sg);