Lines Matching refs:order
72 unsigned order, void *entry, gfp_t gfp) in xa_store_order() argument
74 XA_STATE_ORDER(xas, xa, index, order); in xa_store_order()
177 unsigned int order; in check_xa_mark_1() local
207 for (order = 2; order < max_order; order++) { in check_xa_mark_1()
208 unsigned long base = round_down(index, 1UL << order); in check_xa_mark_1()
209 unsigned long next = base + (1UL << order); in check_xa_mark_1()
217 xa_store_order(xa, index, order, xa_mk_index(index), in check_xa_mark_1()
328 unsigned int order; in check_xa_shrink() local
353 for (order = 0; order < max_order; order++) { in check_xa_shrink()
354 unsigned long max = (1UL << order) - 1; in check_xa_shrink()
355 xa_store_order(xa, 0, order, xa_mk_value(0), GFP_KERNEL); in check_xa_shrink()
430 unsigned int i, order = 3; in check_cmpxchg_order() local
432 XA_BUG_ON(xa, xa_store_order(xa, 0, order, FIVE, GFP_KERNEL)); in check_cmpxchg_order()
435 XA_BUG_ON(xa, xa_get_order(xa, xa_to_value(FIVE)) != order); in check_cmpxchg_order()
438 for (i = 0; i < (1 << order); i++) { in check_cmpxchg_order()
440 XA_BUG_ON(xa, xa_get_order(xa, i) != order); in check_cmpxchg_order()
444 XA_BUG_ON(xa, xa_load(xa, 1 << order) != NULL); in check_cmpxchg_order()
450 XA_BUG_ON(xa, xa_store_order(xa, 1 << order, order, FIVE, GFP_KERNEL)); in check_cmpxchg_order()
451 for (i = (1 << order); i < (1 << order) + (1 << order) - 1; i++) { in check_cmpxchg_order()
453 XA_BUG_ON(xa, xa_get_order(xa, i) != order); in check_cmpxchg_order()
463 for (i = 0; i < (1 << order); i++) { in check_cmpxchg_order()
469 for (i = (1 << order); i < (1 << order) + (1 << order) - 1; i++) { in check_cmpxchg_order()
471 XA_BUG_ON(xa, xa_get_order(xa, i) != order); in check_cmpxchg_order()
585 unsigned int order) in check_multi_store_1() argument
588 unsigned long min = index & ~((1UL << order) - 1); in check_multi_store_1()
589 unsigned long max = min + (1UL << order); in check_multi_store_1()
591 xa_store_order(xa, index, order, xa_mk_index(index), GFP_KERNEL); in check_multi_store_1()
610 unsigned int order) in check_multi_store_2() argument
613 xa_store_order(xa, index, order, xa_mk_value(0), GFP_KERNEL); in check_multi_store_2()
624 unsigned int order) in check_multi_store_3() argument
630 xa_store_order(xa, index, order, xa_mk_index(index), GFP_KERNEL); in check_multi_store_3()
734 unsigned int order, in check_xa_multi_store_adv_add() argument
738 unsigned int nrpages = 1UL << order; in check_xa_multi_store_adv_add()
743 xas_set_order(&xas, index, order); in check_xa_multi_store_adv_add()
766 unsigned int order) in check_xa_multi_store_adv_del_entry() argument
770 xas_set_order(&xas, index, order); in check_xa_multi_store_adv_del_entry()
777 unsigned int order) in check_xa_multi_store_adv_delete() argument
780 check_xa_multi_store_adv_del_entry(xa, index, order); in check_xa_multi_store_adv_delete()
819 unsigned int order) in check_xa_multi_store_adv() argument
821 unsigned int nrpages = 1UL << order; in check_xa_multi_store_adv()
830 check_xa_multi_store_adv_add(xa, base, order, &some_val); in check_xa_multi_store_adv()
845 check_xa_multi_store_adv_add(xa, next_index, order, &some_val_2); in check_xa_multi_store_adv()
850 check_xa_multi_store_adv_delete(xa, next_index, order); in check_xa_multi_store_adv()
851 check_xa_multi_store_adv_delete(xa, base, order); in check_xa_multi_store_adv()
859 check_xa_multi_store_adv_add(xa, next_index, order, &some_val_2); in check_xa_multi_store_adv()
870 check_xa_multi_store_adv_delete(xa, next_index, order); in check_xa_multi_store_adv()
875 check_xa_multi_store_adv_add(xa, next_next_index, order, &some_val_2); in check_xa_multi_store_adv()
886 check_xa_multi_store_adv_delete(xa, next_next_index, order); in check_xa_multi_store_adv()
1101 unsigned int order, unsigned int present) in __check_store_iter() argument
1103 XA_STATE_ORDER(xas, xa, start, order); in __check_store_iter()
1112 XA_BUG_ON(xa, entry > xa_mk_index(start + (1UL << order) - 1)); in __check_store_iter()
1124 XA_BUG_ON(xa, xa_load(xa, start + (1UL << order) - 1) != in __check_store_iter()
1167 static noinline void check_multi_find_1(struct xarray *xa, unsigned order) in check_multi_find_1() argument
1170 unsigned long multi = 3 << order; in check_multi_find_1()
1171 unsigned long next = 4 << order; in check_multi_find_1()
1174 xa_store_order(xa, multi, order, xa_mk_value(multi), GFP_KERNEL); in check_multi_find_1()
1225 unsigned int order; in check_multi_find_3() local
1227 for (order = 5; order < order_limit; order++) { in check_multi_find_3()
1228 unsigned long index = 1UL << (order - 5); in check_multi_find_3()
1231 xa_store_order(xa, 0, order - 4, xa_mk_index(0), GFP_KERNEL); in check_multi_find_3()
1388 unsigned int order; in check_find_entry() local
1391 for (order = 0; order < 20; order++) { in check_find_entry()
1392 for (offset = 0; offset < (1UL << (order + 3)); in check_find_entry()
1393 offset += (1UL << order)) { in check_find_entry()
1394 for (index = 0; index < (1UL << (order + 5)); in check_find_entry()
1395 index += (1UL << order)) { in check_find_entry()
1396 xa_store_order(xa, index, order, in check_find_entry()
1421 unsigned int order; in check_pause() local
1425 for (order = 0; order < order_limit; order++) { in check_pause()
1426 XA_BUG_ON(xa, xa_store_order(xa, index, order, in check_pause()
1428 index += 1UL << order; in check_pause()
1614 unsigned long index, unsigned order) in xa_store_many_order() argument
1616 XA_STATE_ORDER(xas, xa, index, order); in xa_store_many_order()
1625 for (i = 0; i < (1U << order); i++) { in xa_store_many_order()
1637 unsigned long index, unsigned order) in check_create_range_1() argument
1641 xa_store_many_order(xa, index, order); in check_create_range_1()
1642 for (i = index; i < index + (1UL << order); i++) in check_create_range_1()
1647 static noinline void check_create_range_2(struct xarray *xa, unsigned order) in check_create_range_2() argument
1650 unsigned long nr = 1UL << order; in check_create_range_2()
1653 xa_store_many_order(xa, i, order); in check_create_range_2()
1668 unsigned long index, unsigned order) in check_create_range_4() argument
1670 XA_STATE_ORDER(xas, xa, index, order); in check_create_range_4()
1680 for (i = 0; i < (1UL << order); i++) { in check_create_range_4()
1694 for (i = base; i < base + (1UL << order); i++) in check_create_range_4()
1700 unsigned long index, unsigned int order) in check_create_range_5() argument
1702 XA_STATE_ORDER(xas, xa, index, order); in check_create_range_5()
1705 xa_store_order(xa, index, order, xa_mk_index(index), GFP_KERNEL); in check_create_range_5()
1707 for (i = 0; i < order + 10; i++) { in check_create_range_5()
1720 unsigned int order; in check_create_range() local
1723 for (order = 0; order < max_order; order++) { in check_create_range()
1724 check_create_range_1(xa, 0, order); in check_create_range()
1725 check_create_range_1(xa, 1U << order, order); in check_create_range()
1726 check_create_range_1(xa, 2U << order, order); in check_create_range()
1727 check_create_range_1(xa, 3U << order, order); in check_create_range()
1728 check_create_range_1(xa, 1U << 24, order); in check_create_range()
1729 if (order < 10) in check_create_range()
1730 check_create_range_2(xa, order); in check_create_range()
1732 check_create_range_4(xa, 0, order); in check_create_range()
1733 check_create_range_4(xa, 1U << order, order); in check_create_range()
1734 check_create_range_4(xa, 2U << order, order); in check_create_range()
1735 check_create_range_4(xa, 3U << order, order); in check_create_range()
1736 check_create_range_4(xa, 1U << 24, order); in check_create_range()
1738 check_create_range_4(xa, 1, order); in check_create_range()
1739 check_create_range_4(xa, (1U << order) + 1, order); in check_create_range()
1740 check_create_range_4(xa, (2U << order) + 1, order); in check_create_range()
1741 check_create_range_4(xa, (2U << order) - 1, order); in check_create_range()
1742 check_create_range_4(xa, (3U << order) + 1, order); in check_create_range()
1743 check_create_range_4(xa, (3U << order) - 1, order); in check_create_range()
1744 check_create_range_4(xa, (1U << 24) + 1, order); in check_create_range()
1746 check_create_range_5(xa, 0, order); in check_create_range()
1747 check_create_range_5(xa, (1U << order), order); in check_create_range()
1788 unsigned int order, unsigned int new_order) in check_split_1() argument
1794 xa_store_order(xa, index, order, xa, GFP_KERNEL); in check_split_1()
1797 xas_split_alloc(&xas, xa, order, GFP_KERNEL); in check_split_1()
1799 xas_split(&xas, xa, order); in check_split_1()
1800 for (i = 0; i < (1 << order); i += (1 << new_order)) in check_split_1()
1804 for (i = 0; i < (1 << order); i++) { in check_split_1()
1820 XA_BUG_ON(xa, found != 1 << (order - new_order)); in check_split_1()
1827 unsigned int order, new_order; in check_split() local
1831 for (order = 1; order < 2 * XA_CHUNK_SHIFT; order++) { in check_split()
1832 for (new_order = 0; new_order < order; new_order++) { in check_split()
1833 check_split_1(xa, 0, order, new_order); in check_split()
1834 check_split_1(xa, 1UL << order, order, new_order); in check_split()
1835 check_split_1(xa, 3UL << order, order, new_order); in check_split()
1958 unsigned int order; in check_account() local
1960 for (order = 1; order < 12; order++) { in check_account()
1961 XA_STATE(xas, xa, 1 << order); in check_account()
1963 xa_store_order(xa, 0, order, xa, GFP_KERNEL); in check_account()
1967 XA_BUG_ON(xa, xas.xa_node->count > (1 << order)); in check_account()
1971 xa_store_order(xa, 1 << order, order, xa_mk_index(1UL << order), in check_account()
1975 xa_erase(xa, 1 << order); in check_account()
1987 unsigned int order; in check_get_order() local
1993 for (order = 0; order < max_order; order++) { in check_get_order()
1995 xa_store_order(xa, i << order, order, in check_get_order()
1996 xa_mk_index(i << order), GFP_KERNEL); in check_get_order()
1997 for (j = i << order; j < (i + 1) << order; j++) in check_get_order()
1998 XA_BUG_ON(xa, xa_get_order(xa, j) != order); in check_get_order()
1999 xa_erase(xa, i << order); in check_get_order()
2009 unsigned int order; in check_xas_get_order() local
2012 for (order = 0; order < max_order; order++) { in check_xas_get_order()
2014 xas_set_order(&xas, i << order, order); in check_xas_get_order()
2021 for (j = i << order; j < (i + 1) << order; j++) { in check_xas_get_order()
2025 XA_BUG_ON(xa, xas_get_order(&xas) != order); in check_xas_get_order()
2030 xas_set_order(&xas, i << order, order); in check_xas_get_order()
2044 unsigned int order; in check_xas_conflict_get_order() local
2047 for (order = 0; order < max_order; order++) { in check_xas_conflict_get_order()
2049 xas_set_order(&xas, i << order, order); in check_xas_conflict_get_order()
2059 j = i << order; in check_xas_conflict_get_order()
2060 for (k = 0; k < order; k++) { in check_xas_conflict_get_order()
2066 XA_BUG_ON(xa, xas_get_order(&xas) != order); in check_xas_conflict_get_order()
2073 if (order < max_order - 1) { in check_xas_conflict_get_order()
2075 xas_set_order(&xas, (i & ~1UL) << order, order + 1); in check_xas_conflict_get_order()
2079 XA_BUG_ON(xa, xas_get_order(&xas) != order); in check_xas_conflict_get_order()
2086 xas_set_order(&xas, i << order, order); in check_xas_conflict_get_order()