Lines Matching refs:piter

712 void __sg_page_iter_start(struct sg_page_iter *piter,  in __sg_page_iter_start()  argument
716 piter->__pg_advance = 0; in __sg_page_iter_start()
717 piter->__nents = nents; in __sg_page_iter_start()
719 piter->sg = sglist; in __sg_page_iter_start()
720 piter->sg_pgoffset = pgoffset; in __sg_page_iter_start()
729 bool __sg_page_iter_next(struct sg_page_iter *piter) in __sg_page_iter_next() argument
731 if (!piter->__nents || !piter->sg) in __sg_page_iter_next()
734 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_next()
735 piter->__pg_advance = 1; in __sg_page_iter_next()
737 while (piter->sg_pgoffset >= sg_page_count(piter->sg)) { in __sg_page_iter_next()
738 piter->sg_pgoffset -= sg_page_count(piter->sg); in __sg_page_iter_next()
739 piter->sg = sg_next(piter->sg); in __sg_page_iter_next()
740 if (!--piter->__nents || !piter->sg) in __sg_page_iter_next()
755 struct sg_page_iter *piter = &dma_iter->base; in __sg_page_iter_dma_next() local
757 if (!piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
760 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_dma_next()
761 piter->__pg_advance = 1; in __sg_page_iter_dma_next()
763 while (piter->sg_pgoffset >= sg_dma_page_count(piter->sg)) { in __sg_page_iter_dma_next()
764 piter->sg_pgoffset -= sg_dma_page_count(piter->sg); in __sg_page_iter_dma_next()
765 piter->sg = sg_next(piter->sg); in __sg_page_iter_dma_next()
766 if (!--piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
791 __sg_page_iter_start(&miter->piter, sgl, nents, 0); in sg_miter_start()
802 if (!__sg_page_iter_next(&miter->piter)) in sg_miter_get_next_page()
805 sg = miter->piter.sg; in sg_miter_get_next_page()
807 miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; in sg_miter_get_next_page()
808 miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; in sg_miter_get_next_page()
811 (miter->piter.sg_pgoffset << PAGE_SHIFT) - in sg_miter_get_next_page()
884 miter->page = sg_page_iter_page(&miter->piter); in sg_miter_next()