Lines Matching refs:sg
242 struct scatterlist *sg; in alloc_and_scatter_data_area() local
244 for_each_sg(data_sg, sg, data_nents, i) { in alloc_and_scatter_data_area()
245 copy_bytes = min_t(size_t, sg->length, in alloc_and_scatter_data_area()
247 from = kmap_atomic(sg_page(sg)) + sg->offset; in alloc_and_scatter_data_area()
265 if (sg->length != copy_bytes) { in alloc_and_scatter_data_area()
268 copy_bytes = sg->length - copy_bytes; in alloc_and_scatter_data_area()
288 kunmap_atomic(from - sg->offset); in alloc_and_scatter_data_area()
298 struct scatterlist *sg; in gather_and_free_data_area() local
301 for_each_sg(data_sg, sg, data_nents, i) { in gather_and_free_data_area()
302 copy_bytes = min_t(size_t, sg->length, in gather_and_free_data_area()
305 to = kmap_atomic(sg_page(sg)) + sg->offset; in gather_and_free_data_area()
306 WARN_ON(sg->length + sg->offset > PAGE_SIZE); in gather_and_free_data_area()
315 if (sg->length != copy_bytes) { in gather_and_free_data_area()
321 copy_bytes = sg->length - copy_bytes; in gather_and_free_data_area()
328 kunmap_atomic(to - sg->offset); in gather_and_free_data_area()