Lines Matching refs:piter
726 void __sg_page_iter_start(struct sg_page_iter *piter, in __sg_page_iter_start() argument
730 piter->__pg_advance = 0; in __sg_page_iter_start()
731 piter->__nents = nents; in __sg_page_iter_start()
733 piter->sg = sglist; in __sg_page_iter_start()
734 piter->sg_pgoffset = pgoffset; in __sg_page_iter_start()
743 bool __sg_page_iter_next(struct sg_page_iter *piter) in __sg_page_iter_next() argument
745 if (!piter->__nents || !piter->sg) in __sg_page_iter_next()
748 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_next()
749 piter->__pg_advance = 1; in __sg_page_iter_next()
751 while (piter->sg_pgoffset >= sg_page_count(piter->sg)) { in __sg_page_iter_next()
752 piter->sg_pgoffset -= sg_page_count(piter->sg); in __sg_page_iter_next()
753 piter->sg = sg_next(piter->sg); in __sg_page_iter_next()
754 if (!--piter->__nents || !piter->sg) in __sg_page_iter_next()
769 struct sg_page_iter *piter = &dma_iter->base; in __sg_page_iter_dma_next() local
771 if (!piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
774 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_dma_next()
775 piter->__pg_advance = 1; in __sg_page_iter_dma_next()
777 while (piter->sg_pgoffset >= sg_dma_page_count(piter->sg)) { in __sg_page_iter_dma_next()
778 piter->sg_pgoffset -= sg_dma_page_count(piter->sg); in __sg_page_iter_dma_next()
779 piter->sg = sg_next(piter->sg); in __sg_page_iter_dma_next()
780 if (!--piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
806 __sg_page_iter_start(&miter->piter, sgl, nents, 0); in sg_miter_start()
817 if (!__sg_page_iter_next(&miter->piter)) in sg_miter_get_next_page()
820 sg = miter->piter.sg; in sg_miter_get_next_page()
822 miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; in sg_miter_get_next_page()
823 miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; in sg_miter_get_next_page()
826 (miter->piter.sg_pgoffset << PAGE_SHIFT) - in sg_miter_get_next_page()
899 miter->page = sg_page_iter_page(&miter->piter); in sg_miter_next()