Lines Matching refs:iter
137 struct hns_roce_hem_iter *iter) in hns_roce_hem_first() argument
139 iter->hem = hem; in hns_roce_hem_first()
140 iter->chunk = list_empty(&hem->chunk_list) ? NULL : in hns_roce_hem_first()
143 iter->page_idx = 0; in hns_roce_hem_first()
146 static inline int hns_roce_hem_last(struct hns_roce_hem_iter *iter) in hns_roce_hem_last() argument
148 return !iter->chunk; in hns_roce_hem_last()
151 static inline void hns_roce_hem_next(struct hns_roce_hem_iter *iter) in hns_roce_hem_next() argument
153 if (++iter->page_idx >= iter->chunk->nsg) { in hns_roce_hem_next()
154 if (iter->chunk->list.next == &iter->hem->chunk_list) { in hns_roce_hem_next()
155 iter->chunk = NULL; in hns_roce_hem_next()
159 iter->chunk = list_entry(iter->chunk->list.next, in hns_roce_hem_next()
161 iter->page_idx = 0; in hns_roce_hem_next()
165 static inline dma_addr_t hns_roce_hem_addr(struct hns_roce_hem_iter *iter) in hns_roce_hem_addr() argument
167 return sg_dma_address(&iter->chunk->mem[iter->page_idx]); in hns_roce_hem_addr()