• Home
  • Raw
  • Download

Lines Matching refs:start_index

182 				 unsigned long start_index,  in iopt_pages_err_unpin()  argument
186 unsigned long npages = last_index - start_index + 1; in iopt_pages_err_unpin()
239 unsigned long start_index, in iopt_area_unmap_domain_range() argument
242 unsigned long start_iova = iopt_area_index_to_iova(area, start_index); in iopt_area_unmap_domain_range()
377 struct iopt_area *area, unsigned long start_index, in batch_from_domain() argument
384 iova = iopt_area_index_to_iova(area, start_index); in batch_from_domain()
385 if (start_index == iopt_area_index(area)) in batch_from_domain()
387 while (start_index <= last_index) { in batch_from_domain()
398 start_index++; in batch_from_domain()
404 unsigned long start_index, in raw_pages_from_domain() argument
412 iova = iopt_area_index_to_iova(area, start_index); in raw_pages_from_domain()
413 if (start_index == iopt_area_index(area)) in raw_pages_from_domain()
415 while (start_index <= last_index) { in raw_pages_from_domain()
420 start_index++; in raw_pages_from_domain()
429 unsigned long start_index, in batch_from_domain_continue() argument
435 batch_from_domain(batch, domain, area, start_index, last_index); in batch_from_domain_continue()
476 struct iopt_area *area, unsigned long start_index) in batch_to_domain() argument
488 if (start_index == iopt_area_index(area)) in batch_to_domain()
491 iopt_area_index_to_iova(area, start_index); in batch_to_domain()
520 unsigned long start_index, in batch_from_xarray() argument
523 XA_STATE(xas, xa, start_index); in batch_from_xarray()
533 start_index == last_index) in batch_from_xarray()
535 start_index++; in batch_from_xarray()
541 unsigned long start_index, in batch_from_xarray_clear() argument
544 XA_STATE(xas, xa, start_index); in batch_from_xarray_clear()
556 if (start_index == last_index) in batch_from_xarray_clear()
558 start_index++; in batch_from_xarray_clear()
563 static void clear_xarray(struct xarray *xa, unsigned long start_index, in clear_xarray() argument
566 XA_STATE(xas, xa, start_index); in clear_xarray()
575 static int pages_to_xarray(struct xarray *xa, unsigned long start_index, in pages_to_xarray() argument
578 struct page **end_pages = pages + (last_index - start_index) + 1; in pages_to_xarray()
580 XA_STATE(xas, xa, start_index); in pages_to_xarray()
608 if (xas.xa_index != start_index) in pages_to_xarray()
609 clear_xarray(xa, start_index, xas.xa_index - 1); in pages_to_xarray()
738 unsigned long start_index, in pfn_reader_user_pin() argument
747 WARN_ON(last_index < start_index)) in pfn_reader_user_pin()
753 (last_index - start_index + 1) * sizeof(*user->upages); in pfn_reader_user_pin()
772 npages = min_t(unsigned long, last_index - start_index + 1, in pfn_reader_user_pin()
779 uptr = (uintptr_t)(pages->uptr + start_index * PAGE_SIZE); in pfn_reader_user_pin()
798 user->upages_start = start_index; in pfn_reader_user_pin()
799 user->upages_end = start_index + rc; in pfn_reader_user_pin()
979 unsigned long start_index = pfns->batch_end_index; in pfn_reader_fill_span() local
984 WARN_ON(span->last_used < start_index)) in pfn_reader_fill_span()
989 start_index, span->last_used); in pfn_reader_fill_span()
999 area = iopt_pages_find_domain_area(pfns->pages, start_index); in pfn_reader_fill_span()
1005 &pfns->batch, area->storage_domain, area, start_index, in pfn_reader_fill_span()
1010 if (start_index >= pfns->user.upages_end) { in pfn_reader_fill_span()
1011 rc = pfn_reader_user_pin(&pfns->user, pfns->pages, start_index, in pfn_reader_fill_span()
1019 (start_index - pfns->user.upages_start), in pfn_reader_fill_span()
1020 pfns->user.upages_end - start_index); in pfn_reader_fill_span()
1063 unsigned long start_index, unsigned long last_index) in pfn_reader_init() argument
1070 pfns->batch_start_index = start_index; in pfn_reader_init()
1071 pfns->batch_end_index = start_index; in pfn_reader_init()
1074 rc = batch_init(&pfns->batch, last_index - start_index + 1); in pfn_reader_init()
1078 &pages->domains_itree, start_index, in pfn_reader_init()
1122 unsigned long start_index, unsigned long last_index) in pfn_reader_first() argument
1127 WARN_ON(last_index < start_index)) in pfn_reader_first()
1130 rc = pfn_reader_init(pfns, pages, start_index, last_index); in pfn_reader_first()
1199 unsigned long start_index, unsigned long last_index, in iopt_area_unpin_domain() argument
1203 while (start_index <= last_index) { in iopt_area_unpin_domain()
1208 max(start_index, *unmapped_end_index); in iopt_area_unpin_domain()
1214 start_index); in iopt_area_unpin_domain()
1217 batch_last_index = start_index + batch->total_pfns - 1; in iopt_area_unpin_domain()
1243 start_index + batch->total_pfns - 1); in iopt_area_unpin_domain()
1244 *unmapped_end_index = start_index + batch->total_pfns; in iopt_area_unpin_domain()
1249 batch_last_index - start_index + 1); in iopt_area_unpin_domain()
1250 start_index = batch_last_index + 1; in iopt_area_unpin_domain()
1263 unsigned long start_index = iopt_area_index(area); in __iopt_area_unfill_domain() local
1264 unsigned long unmapped_end_index = start_index; in __iopt_area_unfill_domain()
1286 &pages->access_itree, start_index, in __iopt_area_unfill_domain()
1521 unsigned long start_index, in iopt_pages_unpin_xarray() argument
1524 while (start_index <= end_index) { in iopt_pages_unpin_xarray()
1525 batch_from_xarray_clear(batch, &pages->pinned_pfns, start_index, in iopt_pages_unpin_xarray()
1528 start_index += batch->total_pfns; in iopt_pages_unpin_xarray()
1543 unsigned long start_index, in iopt_pages_unfill_xarray() argument
1554 &pages->domains_itree, start_index, in iopt_pages_unfill_xarray()
1559 last_index - start_index + 1, in iopt_pages_unfill_xarray()
1591 unsigned long start_index, in iopt_pages_fill_from_xarray() argument
1595 XA_STATE(xas, &pages->pinned_pfns, start_index); in iopt_pages_fill_from_xarray()
1599 while (start_index <= last_index) { in iopt_pages_fill_from_xarray()
1605 start_index++; in iopt_pages_fill_from_xarray()
1611 unsigned long start_index, in iopt_pages_fill_from_domain() argument
1615 while (start_index != last_index + 1) { in iopt_pages_fill_from_domain()
1619 area = iopt_pages_find_domain_area(pages, start_index); in iopt_pages_fill_from_domain()
1625 start_index, domain_last, in iopt_pages_fill_from_domain()
1627 start_index = domain_last + 1; in iopt_pages_fill_from_domain()
1634 unsigned long start_index, in iopt_pages_fill_from_mm() argument
1638 unsigned long cur_index = start_index; in iopt_pages_fill_from_mm()
1642 user->upages = out_pages + (cur_index - start_index); in iopt_pages_fill_from_mm()
1651 if (start_index != cur_index) in iopt_pages_fill_from_mm()
1652 iopt_pages_err_unpin(pages, start_index, cur_index - 1, in iopt_pages_fill_from_mm()
1671 int iopt_pages_fill_xarray(struct iopt_pages *pages, unsigned long start_index, in iopt_pages_fill_xarray() argument
1675 unsigned long xa_end = start_index; in iopt_pages_fill_xarray()
1682 user.upages_len = (last_index - start_index + 1) * sizeof(*out_pages); in iopt_pages_fill_xarray()
1684 &pages->domains_itree, start_index, in iopt_pages_fill_xarray()
1689 cur_pages = out_pages + (span.start_used - start_index); in iopt_pages_fill_xarray()
1696 cur_pages = out_pages + (span.start_used - start_index); in iopt_pages_fill_xarray()
1709 cur_pages = out_pages + (span.start_hole - start_index); in iopt_pages_fill_xarray()
1731 if (start_index != xa_end) in iopt_pages_fill_xarray()
1732 iopt_pages_unfill_xarray(pages, start_index, xa_end - 1); in iopt_pages_fill_xarray()
1744 unsigned long start_index, in iopt_pages_rw_slow() argument
1754 rc = pfn_reader_first(&pfns, pages, start_index, last_index); in iopt_pages_rw_slow()
1834 unsigned long start_index = start_byte / PAGE_SIZE; in iopt_pages_rw_access() local
1847 if (start_index == last_index) in iopt_pages_rw_access()
1848 return iopt_pages_rw_page(pages, start_index, in iopt_pages_rw_access()
1851 return iopt_pages_rw_slow(pages, start_index, last_index, in iopt_pages_rw_access()
1862 return iopt_pages_rw_slow(pages, start_index, in iopt_pages_rw_access()
1915 int iopt_area_add_access(struct iopt_area *area, unsigned long start_index, in iopt_area_add_access() argument
1927 access = iopt_pages_get_exact_access(pages, start_index, last_index); in iopt_area_add_access()
1931 iopt_pages_fill_from_xarray(pages, start_index, last_index, in iopt_area_add_access()
1943 rc = iopt_pages_fill_xarray(pages, start_index, last_index, out_pages); in iopt_area_add_access()
1947 access->node.start = start_index; in iopt_area_add_access()
1971 void iopt_area_remove_access(struct iopt_area *area, unsigned long start_index, in iopt_area_remove_access() argument
1978 access = iopt_pages_get_exact_access(pages, start_index, last_index); in iopt_area_remove_access()
1989 iopt_pages_unfill_xarray(pages, start_index, last_index); in iopt_area_remove_access()