Lines Matching refs:xas
523 XA_STATE(xas, xa, start_index); in batch_from_xarray()
528 entry = xas_next(&xas); in batch_from_xarray()
529 if (xas_retry(&xas, entry)) in batch_from_xarray()
544 XA_STATE(xas, xa, start_index); in batch_from_xarray_clear()
547 xas_lock(&xas); in batch_from_xarray_clear()
549 entry = xas_next(&xas); in batch_from_xarray_clear()
550 if (xas_retry(&xas, entry)) in batch_from_xarray_clear()
555 xas_store(&xas, NULL); in batch_from_xarray_clear()
560 xas_unlock(&xas); in batch_from_xarray_clear()
566 XA_STATE(xas, xa, start_index); in clear_xarray()
569 xas_lock(&xas); in clear_xarray()
570 xas_for_each(&xas, entry, last_index) in clear_xarray()
571 xas_store(&xas, NULL); in clear_xarray()
572 xas_unlock(&xas); in clear_xarray()
580 XA_STATE(xas, xa, start_index); in pages_to_xarray()
585 xas_lock(&xas); in pages_to_xarray()
589 xas_set_err(&xas, -EINVAL); in pages_to_xarray()
590 xas_unlock(&xas); in pages_to_xarray()
592 xas_nomem(&xas, GFP_KERNEL); in pages_to_xarray()
596 old = xas_store(&xas, xa_mk_value(page_to_pfn(*pages))); in pages_to_xarray()
597 if (xas_error(&xas)) in pages_to_xarray()
601 xas_next(&xas); in pages_to_xarray()
603 xas_unlock(&xas); in pages_to_xarray()
604 } while (xas_nomem(&xas, GFP_KERNEL)); in pages_to_xarray()
607 if (xas_error(&xas)) { 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()
610 return xas_error(&xas); in pages_to_xarray()
1595 XA_STATE(xas, &pages->pinned_pfns, start_index); in iopt_pages_fill_from_xarray()
1600 entry = xas_next(&xas); in iopt_pages_fill_from_xarray()
1601 if (xas_retry(&xas, entry)) in iopt_pages_fill_from_xarray()