Lines Matching refs:piter

722 void __sg_page_iter_start(struct sg_page_iter *piter,  in __sg_page_iter_start()  argument
726 piter->__pg_advance = 0; in __sg_page_iter_start()
727 piter->__nents = nents; in __sg_page_iter_start()
729 piter->sg = sglist; in __sg_page_iter_start()
730 piter->sg_pgoffset = pgoffset; in __sg_page_iter_start()
739 bool __sg_page_iter_next(struct sg_page_iter *piter) in __sg_page_iter_next() argument
741 if (!piter->__nents || !piter->sg) in __sg_page_iter_next()
744 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_next()
745 piter->__pg_advance = 1; in __sg_page_iter_next()
747 while (piter->sg_pgoffset >= sg_page_count(piter->sg)) { in __sg_page_iter_next()
748 piter->sg_pgoffset -= sg_page_count(piter->sg); in __sg_page_iter_next()
749 piter->sg = sg_next(piter->sg); in __sg_page_iter_next()
750 if (!--piter->__nents || !piter->sg) in __sg_page_iter_next()
765 struct sg_page_iter *piter = &dma_iter->base; in __sg_page_iter_dma_next() local
767 if (!piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
770 piter->sg_pgoffset += piter->__pg_advance; in __sg_page_iter_dma_next()
771 piter->__pg_advance = 1; in __sg_page_iter_dma_next()
773 while (piter->sg_pgoffset >= sg_dma_page_count(piter->sg)) { in __sg_page_iter_dma_next()
774 piter->sg_pgoffset -= sg_dma_page_count(piter->sg); in __sg_page_iter_dma_next()
775 piter->sg = sg_next(piter->sg); in __sg_page_iter_dma_next()
776 if (!--piter->__nents || !piter->sg) in __sg_page_iter_dma_next()
801 __sg_page_iter_start(&miter->piter, sgl, nents, 0); in sg_miter_start()
812 if (!__sg_page_iter_next(&miter->piter)) in sg_miter_get_next_page()
815 sg = miter->piter.sg; in sg_miter_get_next_page()
817 miter->__offset = miter->piter.sg_pgoffset ? 0 : sg->offset; in sg_miter_get_next_page()
818 miter->piter.sg_pgoffset += miter->__offset >> PAGE_SHIFT; in sg_miter_get_next_page()
821 (miter->piter.sg_pgoffset << PAGE_SHIFT) - in sg_miter_get_next_page()
894 miter->page = sg_page_iter_page(&miter->piter); in sg_miter_next()