Lines Matching refs:i
149 unsigned long i, j; in check_xa_load() local
151 for (i = 0; i < 1024; i++) { in check_xa_load()
154 if (j < i) in check_xa_load()
159 XA_BUG_ON(xa, xa_store_index(xa, i, GFP_KERNEL) != NULL); in check_xa_load()
162 for (i = 0; i < 1024; i++) { in check_xa_load()
165 if (j >= i) in check_xa_load()
170 xa_erase_index(xa, i); in check_xa_load()
210 unsigned long i; in check_xa_mark_1() local
219 for (i = base; i < next; i++) { in check_xa_mark_1()
220 XA_STATE(xas, xa, i); in check_xa_mark_1()
224 XA_BUG_ON(xa, !xa_get_mark(xa, i, XA_MARK_0)); in check_xa_mark_1()
225 XA_BUG_ON(xa, xa_get_mark(xa, i, XA_MARK_1)); in check_xa_mark_1()
226 XA_BUG_ON(xa, !xa_get_mark(xa, i, XA_MARK_2)); in check_xa_mark_1()
375 unsigned long i; in check_insert() local
377 for (i = 0; i < 1024; i++) { in check_insert()
378 xa_insert_index(xa, i); in check_insert()
379 XA_BUG_ON(xa, xa_load(xa, i - 1) != NULL); in check_insert()
380 XA_BUG_ON(xa, xa_load(xa, i + 1) != NULL); in check_insert()
381 xa_erase_index(xa, i); in check_insert()
384 for (i = 10; i < BITS_PER_LONG; i++) { in check_insert()
385 xa_insert_index(xa, 1UL << i); in check_insert()
386 XA_BUG_ON(xa, xa_load(xa, (1UL << i) - 1) != NULL); in check_insert()
387 XA_BUG_ON(xa, xa_load(xa, (1UL << i) + 1) != NULL); in check_insert()
388 xa_erase_index(xa, 1UL << i); in check_insert()
390 xa_insert_index(xa, (1UL << i) - 1); in check_insert()
391 XA_BUG_ON(xa, xa_load(xa, (1UL << i) - 2) != NULL); in check_insert()
392 XA_BUG_ON(xa, xa_load(xa, 1UL << i) != NULL); in check_insert()
393 xa_erase_index(xa, (1UL << i) - 1); in check_insert()
430 unsigned int i, order = 3; in check_cmpxchg_order() local
438 for (i = 0; i < (1 << order); i++) { in check_cmpxchg_order()
439 XA_BUG_ON(xa, xa_load(xa, i) != FIVE); in check_cmpxchg_order()
440 XA_BUG_ON(xa, xa_get_order(xa, i) != order); in check_cmpxchg_order()
451 for (i = (1 << order); i < (1 << order) + (1 << order) - 1; i++) { in check_cmpxchg_order()
452 XA_BUG_ON(xa, xa_load(xa, i) != FIVE); 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()
464 XA_BUG_ON(xa, xa_load(xa, i) != NULL); in check_cmpxchg_order()
465 XA_BUG_ON(xa, xa_get_order(xa, i) != 0); in check_cmpxchg_order()
469 for (i = (1 << order); i < (1 << order) + (1 << order) - 1; i++) { in check_cmpxchg_order()
470 XA_BUG_ON(xa, xa_load(xa, i) != FIVE); in check_cmpxchg_order()
471 XA_BUG_ON(xa, xa_get_order(xa, i) != order); in check_cmpxchg_order()
549 unsigned long i, j; in check_xas_erase() local
551 for (i = 0; i < 200; i++) { in check_xas_erase()
552 for (j = i; j < 2 * i + 17; j++) { in check_xas_erase()
572 j = i; in check_xas_erase()
653 unsigned long i, j, k; in check_multi_store() local
698 for (i = 0; i < max_order; i++) { in check_multi_store()
700 xa_store_order(xa, 0, i, xa_mk_index(i), GFP_KERNEL); in check_multi_store()
705 if ((i < k) && (j < k)) in check_multi_store()
716 for (i = 0; i < 20; i++) { in check_multi_store()
717 check_multi_store_1(xa, 200, i); in check_multi_store()
718 check_multi_store_1(xa, 0, i); in check_multi_store()
719 check_multi_store_1(xa, (1UL << i) + 1, i); in check_multi_store()
723 for (i = 1; i < 20; i++) { in check_multi_store()
724 check_multi_store_3(xa, 0, i); in check_multi_store()
725 check_multi_store_3(xa, 1UL << i, i); in check_multi_store()
823 unsigned int i; in check_xa_multi_store_adv() local
832 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
833 XA_BUG_ON(xa, test_get_entry(xa, base + i) != &some_val); in check_xa_multi_store_adv()
847 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
848 XA_BUG_ON(xa, test_get_entry(xa, next_index + i) != &some_val_2); in check_xa_multi_store_adv()
861 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
862 XA_BUG_ON(xa, test_get_entry(xa, base + i) != NULL); in check_xa_multi_store_adv()
864 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
865 XA_BUG_ON(xa, test_get_entry(xa, next_index + i) != &some_val_2); in check_xa_multi_store_adv()
867 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
868 XA_BUG_ON(xa, test_get_entry(xa, next_next_index + i) != NULL); in check_xa_multi_store_adv()
877 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
878 XA_BUG_ON(xa, test_get_entry(xa, base + i) != NULL); in check_xa_multi_store_adv()
880 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
881 XA_BUG_ON(xa, test_get_entry(xa, next_index + i) != NULL); in check_xa_multi_store_adv()
883 for (i = 0; i < nrpages; i++) in check_xa_multi_store_adv()
884 XA_BUG_ON(xa, test_get_entry(xa, next_next_index + i) != &some_val_2); in check_xa_multi_store_adv()
896 unsigned long pos, i; in check_multi_store_advanced() local
902 for (i = 0; i < max_order; i++) { in check_multi_store_advanced()
903 check_xa_multi_store_adv(xa, pos, i); in check_multi_store_advanced()
904 check_xa_multi_store_adv(xa, pos + 157, i); in check_multi_store_advanced()
912 int i; in check_xa_alloc_1() local
927 for (i = base + 1; i < 2 * XA_CHUNK_SIZE; i++) in check_xa_alloc_1()
928 xa_alloc_index(xa, i, GFP_KERNEL); in check_xa_alloc_1()
929 for (i = base; i < 2 * XA_CHUNK_SIZE; i++) in check_xa_alloc_1()
930 xa_erase_index(xa, i); in check_xa_alloc_1()
954 for (i = 1; i < 5000; i++) { in check_xa_alloc_1()
955 xa_alloc_index(xa, base + i, GFP_KERNEL); in check_xa_alloc_1()
987 unsigned int i, id; in check_xa_alloc_2() local
1007 for (i = base; i < base + 10; i++) { in check_xa_alloc_2()
1010 XA_BUG_ON(xa, id != i); in check_xa_alloc_2()
1024 for (i = base; i < base + 9; i++) { in check_xa_alloc_2()
1025 XA_BUG_ON(xa, xa_erase(xa, i) != NULL); in check_xa_alloc_2()
1040 unsigned int i, id; in check_xa_alloc_3() local
1057 for (i = 0x3ffe; i < 0x4003; i++) { in check_xa_alloc_3()
1058 if (i < 0x4000) in check_xa_alloc_3()
1059 entry = xa_mk_index(i); in check_xa_alloc_3()
1061 entry = xa_mk_index(i - 0x3fff); in check_xa_alloc_3()
1144 unsigned int i, j; in check_store_iter() local
1147 for (i = 0; i < max_order; i++) { in check_store_iter()
1148 unsigned int min = 1 << i; in check_store_iter()
1149 unsigned int max = (2 << i) - 1; in check_store_iter()
1150 __check_store_iter(xa, 0, i, 0); in check_store_iter()
1152 __check_store_iter(xa, min, i, 0); in check_store_iter()
1156 __check_store_iter(xa, min, i, 1); in check_store_iter()
1159 __check_store_iter(xa, min, i, 1); in check_store_iter()
1164 __check_store_iter(xa, 0, i, min); in check_store_iter()
1168 __check_store_iter(xa, min, i, min); in check_store_iter()
1215 unsigned int i, j; in check_multi_find_2() local
1218 for (i = 0; i < max_order; i++) { in check_multi_find_2()
1219 unsigned long index = 1UL << i; in check_multi_find_2()
1223 xa_store_order(xa, index, i, xa_mk_index(index), in check_multi_find_2()
1252 unsigned long i, j, k; in check_find_1() local
1260 for (i = 0; i < 100; i++) { in check_find_1()
1261 XA_BUG_ON(xa, xa_store_index(xa, i, GFP_KERNEL) != NULL); in check_find_1()
1262 xa_set_mark(xa, i, XA_MARK_0); in check_find_1()
1263 for (j = 0; j < i; j++) { in check_find_1()
1273 else if (k <= i) in check_find_1()
1274 XA_BUG_ON(xa, index != i); in check_find_1()
1283 else if (k <= i) in check_find_1()
1284 XA_BUG_ON(xa, index != i); in check_find_1()
1290 XA_BUG_ON(xa, !xa_get_mark(xa, i, XA_MARK_0)); in check_find_1()
1292 xa_erase_index(xa, i); in check_find_1()
1293 XA_BUG_ON(xa, xa_get_mark(xa, i, XA_MARK_0)); in check_find_1()
1301 unsigned long i, j, index; in check_find_2() local
1307 for (i = 0; i < 1024; i++) { in check_find_2()
1322 unsigned long i, j, k; in check_find_3() local
1325 for (i = 0; i < 100; i++) { in check_find_3()
1338 xa_store_index(xa, i, GFP_KERNEL); in check_find_3()
1339 xa_set_mark(xa, i, XA_MARK_0); in check_find_3()
1362 unsigned i; in check_find() local
1369 for (i = 2; i < 10; i++) in check_find()
1370 check_multi_find_1(xa, i); in check_find()
1548 unsigned long i; in check_move_small() local
1554 for (i = 0; i < idx * 4; i++) { in check_move_small()
1556 if (i <= idx) in check_move_small()
1558 XA_BUG_ON(xa, xas.xa_index != i); in check_move_small()
1559 if (i == 0 || i == idx) in check_move_small()
1560 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move_small()
1565 XA_BUG_ON(xa, xas.xa_index != i); in check_move_small()
1569 i--; in check_move_small()
1570 if (i <= idx) in check_move_small()
1572 XA_BUG_ON(xa, xas.xa_index != i); in check_move_small()
1573 if (i == 0 || i == idx) in check_move_small()
1574 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move_small()
1577 } while (i > 0); in check_move_small()
1596 unsigned long i; in check_move() local
1598 for (i = 0; i < (1 << 16); i++) in check_move()
1599 XA_BUG_ON(xa, xa_store_index(xa, i, GFP_KERNEL) != NULL); in check_move()
1604 i--; in check_move()
1605 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move()
1606 XA_BUG_ON(xa, i != xas.xa_index); in check_move()
1607 } while (i != 0); in check_move()
1614 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move()
1615 XA_BUG_ON(xa, i != xas.xa_index); in check_move()
1616 i++; in check_move()
1617 } while (i < (1 << 16)); in check_move()
1620 for (i = (1 << 8); i < (1 << 15); i++) in check_move()
1621 xa_erase_index(xa, i); in check_move()
1623 i = xas.xa_index; in check_move()
1628 i--; in check_move()
1629 if ((i < (1 << 8)) || (i >= (1 << 15))) in check_move()
1630 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move()
1633 XA_BUG_ON(xa, i != xas.xa_index); in check_move()
1634 } while (i != 0); in check_move()
1641 if ((i < (1 << 8)) || (i >= (1 << 15))) in check_move()
1642 XA_BUG_ON(xa, entry != xa_mk_index(i)); in check_move()
1645 XA_BUG_ON(xa, i != xas.xa_index); in check_move()
1646 i++; in check_move()
1647 } while (i < (1 << 16)); in check_move()
1655 for (i = 0; i < 16; i++) in check_move()
1656 check_move_small(xa, 1UL << i); in check_move()
1658 for (i = 2; i < 16; i++) in check_move()
1659 check_move_small(xa, (1UL << i) - 1); in check_move()
1666 unsigned int i = 0; in xa_store_many_order() local
1674 for (i = 0; i < (1U << order); i++) { in xa_store_many_order()
1675 XA_BUG_ON(xa, xas_store(&xas, xa_mk_index(index + i))); in xa_store_many_order()
1688 unsigned long i; in check_create_range_1() local
1691 for (i = index; i < index + (1UL << order); i++) in check_create_range_1()
1692 xa_erase_index(xa, i); in check_create_range_1()
1698 unsigned long i; in check_create_range_2() local
1701 for (i = 0; i < nr * nr; i += nr) in check_create_range_2()
1702 xa_store_many_order(xa, i, order); in check_create_range_2()
1703 for (i = 0; i < nr * nr; i++) in check_create_range_2()
1704 xa_erase_index(xa, i); in check_create_range_2()
1721 unsigned long i = 0; in check_create_range_4() local
1729 for (i = 0; i < (1UL << order); i++) { in check_create_range_4()
1730 void *old = xas_store(&xas, xa_mk_index(base + i)); in check_create_range_4()
1732 XA_BUG_ON(xa, old != xa_mk_index(base + i)); in check_create_range_4()
1743 for (i = base; i < base + (1UL << order); i++) in check_create_range_4()
1744 xa_erase_index(xa, i); in check_create_range_4()
1752 unsigned int i; in check_create_range_5() local
1756 for (i = 0; i < order + 10; i++) { in check_create_range_5()
1821 unsigned long i, j; in check_store_range() local
1823 for (i = 0; i < 128; i++) { in check_store_range()
1824 for (j = i; j < 128; j++) { in check_store_range()
1825 __check_store_range(xa, i, j); in check_store_range()
1826 __check_store_range(xa, 128 + i, 128 + j); in check_store_range()
1827 __check_store_range(xa, 4095 + i, 4095 + j); in check_store_range()
1828 __check_store_range(xa, 4096 + i, 4096 + j); in check_store_range()
1829 __check_store_range(xa, 123456 + i, 123456 + j); in check_store_range()
1830 __check_store_range(xa, (1 << 24) + i, (1 << 24) + j); in check_store_range()
1840 unsigned int i, found; in check_split_1() local
1849 for (i = 0; i < (1 << order); i += (1 << new_order)) in check_split_1()
1850 __xa_store(xa, index + i, xa_mk_index(index + i), 0); in check_split_1()
1853 for (i = 0; i < (1 << order); i++) { in check_split_1()
1854 unsigned int val = index + (i & ~((1 << new_order) - 1)); in check_split_1()
1855 XA_BUG_ON(xa, xa_load(xa, index + i) != xa_mk_index(val)); in check_split_1()
1878 unsigned int i, found; in check_split_2() local
1896 for (i = 0; i < (1 << order); i += (1 << new_order)) in check_split_2()
1897 __xa_store(xa, index + i, xa_mk_index(index + i), 0); in check_split_2()
1900 for (i = 0; i < (1 << order); i++) { in check_split_2()
1901 unsigned int val = index + (i & ~((1 << new_order) - 1)); in check_split_2()
1902 XA_BUG_ON(xa, xa_load(xa, index + i) != xa_mk_index(val)); in check_split_2()
1946 int i; in check_align_1() local
1951 for (i = 0; i < 8; i++) { in check_align_1()
1952 XA_BUG_ON(xa, xa_alloc(xa, &id, name + i, xa_limit_32b, in check_align_1()
1954 XA_BUG_ON(xa, id != i); in check_align_1()
1967 int i; in check_align_2() local
1971 for (i = 0; i < 8; i++) { in check_align_2()
1972 XA_BUG_ON(xa, xa_store(xa, 0, name + i, GFP_KERNEL) != NULL); in check_align_2()
1976 for (i = 0; i < 8; i++) { in check_align_2()
1978 XA_BUG_ON(xa, xa_store(xa, 0, name + i, 0) != NULL); in check_align_2()
2089 unsigned long i, j; in check_get_order() local
2091 for (i = 0; i < 3; i++) in check_get_order()
2092 XA_BUG_ON(xa, xa_get_order(xa, i) != 0); in check_get_order()
2095 for (i = 0; i < 10; i++) { in check_get_order()
2096 xa_store_order(xa, i << order, order, in check_get_order()
2097 xa_mk_index(i << order), GFP_KERNEL); in check_get_order()
2098 for (j = i << order; j < (i + 1) << order; j++) in check_get_order()
2100 xa_erase(xa, i << order); in check_get_order()
2111 unsigned long i, j; in check_xas_get_order() local
2114 for (i = 0; i < 10; i++) { in check_xas_get_order()
2115 xas_set_order(&xas, i << order, order); in check_xas_get_order()
2118 xas_store(&xas, xa_mk_value(i)); in check_xas_get_order()
2122 for (j = i << order; j < (i + 1) << order; j++) { in check_xas_get_order()
2131 xas_set_order(&xas, i << order, order); in check_xas_get_order()
2146 unsigned long i, j, k; in check_xas_conflict_get_order() local
2149 for (i = 0; i < 10; i++) { in check_xas_conflict_get_order()
2150 xas_set_order(&xas, i << order, order); in check_xas_conflict_get_order()
2153 xas_store(&xas, xa_mk_value(i)); in check_xas_conflict_get_order()
2160 j = i << order; in check_xas_conflict_get_order()
2166 XA_BUG_ON(xa, entry != xa_mk_value(i)); in check_xas_conflict_get_order()
2176 xas_set_order(&xas, (i & ~1UL) << order, order + 1); in check_xas_conflict_get_order()
2179 XA_BUG_ON(xa, entry != xa_mk_value(i)); in check_xas_conflict_get_order()
2187 xas_set_order(&xas, i << order, order); in check_xas_conflict_get_order()