Lines Matching refs:viter
100 static bool __vmw_piter_non_sg_next(struct vmw_piter *viter) in __vmw_piter_non_sg_next() argument
102 return ++(viter->i) < viter->num_pages; in __vmw_piter_non_sg_next()
105 static bool __vmw_piter_sg_next(struct vmw_piter *viter) in __vmw_piter_sg_next() argument
107 bool ret = __vmw_piter_non_sg_next(viter); in __vmw_piter_sg_next()
109 return __sg_page_iter_dma_next(&viter->iter) && ret; in __vmw_piter_sg_next()
113 static dma_addr_t __vmw_piter_dma_addr(struct vmw_piter *viter) in __vmw_piter_dma_addr() argument
115 return viter->addrs[viter->i]; in __vmw_piter_dma_addr()
118 static dma_addr_t __vmw_piter_sg_addr(struct vmw_piter *viter) in __vmw_piter_sg_addr() argument
120 return sg_page_iter_dma_address(&viter->iter); in __vmw_piter_sg_addr()
135 void vmw_piter_start(struct vmw_piter *viter, const struct vmw_sg_table *vsgt, in vmw_piter_start() argument
138 viter->i = p_offset - 1; in vmw_piter_start()
139 viter->num_pages = vsgt->num_pages; in vmw_piter_start()
140 viter->pages = vsgt->pages; in vmw_piter_start()
143 viter->next = &__vmw_piter_non_sg_next; in vmw_piter_start()
144 viter->dma_address = &__vmw_piter_dma_addr; in vmw_piter_start()
145 viter->addrs = vsgt->addrs; in vmw_piter_start()
149 viter->next = &__vmw_piter_sg_next; in vmw_piter_start()
150 viter->dma_address = &__vmw_piter_sg_addr; in vmw_piter_start()
151 __sg_page_iter_start(&viter->iter.base, vsgt->sgt->sgl, in vmw_piter_start()