Lines Matching defs:index
58 unsigned long index, gfp_t gfp)
60 return mtree_insert(mt, index, xa_mk_value(index & LONG_MAX), gfp);
63 static void __init mtree_erase_index(struct maple_tree *mt, unsigned long index)
65 MT_BUG_ON(mt, mtree_erase(mt, index) != xa_mk_value(index & LONG_MAX));
66 MT_BUG_ON(mt, mtree_load(mt, index) != NULL);
69 static int __init mtree_test_insert(struct maple_tree *mt, unsigned long index,
72 return mtree_insert(mt, index, ptr, GFP_KERNEL);
93 static void __init *mtree_test_load(struct maple_tree *mt, unsigned long index)
95 return mtree_load(mt, index);
98 static void __init *mtree_test_erase(struct maple_tree *mt, unsigned long index)
100 return mtree_erase(mt, index);
140 unsigned long index, void *ptr)
142 void *ret = mtree_test_load(mt, index);
145 pr_err("Load %lu returned %p expect %p\n", index, ret, ptr);
182 unsigned long index, void *ptr)
186 ret = mtree_test_insert(mt, index, ptr);
191 unsigned long index, void *ptr)
195 ret = mtree_test_insert(mt, index, ptr);
201 unsigned long index)
203 return check_load(mt, index, xa_mk_value(index & LONG_MAX));
387 unsigned long last = 0, index = 0;
470 mt_for_each(mt, entry, index, max) {
482 index = 0;
484 mt_for_each(mt, entry, index, ULONG_MAX) {
507 index = 17;
508 entry = mt_find(mt, &index, 512);
512 index = 17;
513 entry = mt_find(mt, &index, 20);
563 mas.index = ULONG_MAX; /* start at max.. */
566 index = mas.index;
571 mas.index = ULONG_MAX;
581 MT_BUG_ON(mt, index != mas.index);
586 mas.index = ULONG_MAX;
693 * 1. min index
694 * 2. max index
779 pr_debug("Found %lu %lu\n", mas.index, mas.last);
784 MT_BUG_ON(mt, mas.index != (holes[i+1] >> 12) - (holes[i+2] >> 12));
861 * 1. min index
862 * 2. max index
954 MT_BUG_ON(mt, mas.index != holes[i] >> 12);
1342 unsigned long index = 16;
1346 MA_STATE(mas, mt, index, index);
1353 MT_BUG_ON(mt, value != xa_mk_value(index));
1355 MT_BUG_ON(mt, value != xa_mk_value(index - 1));
1362 for (i = 0; i <= index; i++) {
1393 MT_BUG_ON(mt, mas.index != 0);
1395 MT_BUG_ON(mt, mas.index != 0);
1427 MT_BUG_ON(mt, mas.index != 1);
1445 MT_BUG_ON(mt, (mas.index != 1) && (mas.last != ULONG_MAX));
1449 MT_BUG_ON(mt, (mas.index != 0) && (mas.last != 0));
1463 MT_BUG_ON(mt, (mas.index != ULONG_MAX) && (mas.last != ULONG_MAX));
1467 MT_BUG_ON(mt, (mas.index != 0) && (mas.last != 0));
1518 unsigned long index;
1527 index = seq100[0];
1528 mas_set(&mas, index);
1540 MT_BUG_ON(mt, entry != xa_mk_value(index));
1544 MT_BUG_ON(mt, entry != xa_mk_value(index + 4));
1549 * At this point, there is a gap of 2 at index + 1 between seq100[3] and
1556 MT_BUG_ON(mt, mas.index != index + 1);
1564 index = seq100[9];
1567 mas.index = index;
1568 mas.last = index;
1571 MT_BUG_ON(mt, entry != xa_mk_value(index));
1574 MT_BUG_ON(mt, entry != xa_mk_value(index + 4));
1586 MT_BUG_ON(mt, mas.index != seq100[6]);
1601 MT_BUG_ON(mt, mas.index != seq100[13]);
1617 MT_BUG_ON(mt, mas.index != seq100[18]);
1633 MT_BUG_ON(mt, mas.index != seq2000[1]);
1756 unsigned long max = 2500, index = 0;
1765 mt_for_each(mt, entry, index, max) {
1770 index = 0;
1860 mas.index = 0;
1868 newmas.index = mas.index;
1895 MT_BUG_ON(mt, mas.index != i * 10);
1899 mas.index = 925;
1912 MT_BUG_ON(mt, mas.index != i * 10);
1916 mas.index = 780;
1929 MT_BUG_ON(mt, mas.index != i * 10);
1933 mas.index = 760;
1968 newmas.index = mas.index;
2003 mas.index = 0;
2012 newmas.index = mas.index;
2087 MT_BUG_ON(mt, mas.index != 690);
2092 MT_BUG_ON(mt, mas.index != 680);
2097 MT_BUG_ON(mt, mas.index != 690);
2102 MT_BUG_ON(mt, mas.index != 700);
2109 MT_BUG_ON(mt, mas.index != 70);
2114 MT_BUG_ON(mt, mas.index != 80);
2119 MT_BUG_ON(mt, mas.index != 70);
2129 MT_BUG_ON(mt, mas.index != level2[2]);
2135 MT_BUG_ON(mt, mas.index != level2[4]);
2141 MT_BUG_ON(mt, mas.index != level2[2]);
2148 MT_BUG_ON(mt, mas.index != (nr_entries * 10));
2153 MT_BUG_ON(mt, mas.index != last_index);
2158 MT_BUG_ON(mt, mas.index != (nr_entries * 10));
2166 MT_BUG_ON(mt, mas.index != 10);
2171 MT_BUG_ON(mt, mas.index != 0);
2176 MT_BUG_ON(mt, mas.index != 0);
2180 mas.index = 0;
2189 MT_BUG_ON(mt, mas.index != 0);
2650 newmas.index = mas.index;
2791 MT_BUG_ON(mt, mas.index != 5);
2799 MT_BUG_ON(mt, mas.index != 161);
2805 MT_BUG_ON(mt, mas.index != 216);
2829 MT_BUG_ON(mt, mas.index != 0);
2834 MT_BUG_ON(mt, mas.index != 0);
2869 MT_BUG_ON(mt, mas.last != mas.index + size - 1);
2903 * Function ENTRY Start Result index & last
2911 * Function ENTRY Start Result index & last
2919 * when index = 0
2921 * when index > 0
2935 * Function ENTRY Start Result index & last
2937 * - before index
2940 * if index > 0
2945 * if index == 0
2964 * Function ENTRY Start Result index & last
2966 * - at index or next
2969 * if index > 0
2974 * if index == 0
2989 * Function ENTRY Start Result index & last
2991 * - at index or before
2994 * if index > 0
2998 * if index == 0
3010 * exists MAS_NONE active range (start at index)
3012 * DNE active active last range (min > index)
3014 * Function ENTRY Start Result index & last
3016 * - Look up index
3019 * if index > 0
3024 * if index == 0
3066 MT_BUG_ON(mt, mas.index != 0);
3075 MT_BUG_ON(mt, mas.index != 0);
3082 MT_BUG_ON(mt, mas.index != 1);
3090 MT_BUG_ON(mt, mas.index != 1);
3099 MT_BUG_ON(mt, mas.index != 0);
3106 MT_BUG_ON(mt, mas.index != 1);
3113 MT_BUG_ON(mt, mas.index != 1);
3121 MT_BUG_ON(mt, mas.index != 1);
3128 MT_BUG_ON(mt, mas.index != 0);
3136 MT_BUG_ON(mt, mas.index != 0);
3143 MT_BUG_ON(mt, mas.index != 0);
3150 MT_BUG_ON(mt, mas.index != 0);
3158 MT_BUG_ON(mt, mas.index != 0);
3166 MT_BUG_ON(mt, mas.index != 1);
3175 MT_BUG_ON(mt, mas.index != 1);
3180 mas.index = mas.last = 10;
3183 MT_BUG_ON(mt, mas.index != 1);
3190 MT_BUG_ON(mt, mas.index != 1);
3198 MT_BUG_ON(mt, mas.index != 0);
3207 MT_BUG_ON(mt, mas.index != 0);
3215 MT_BUG_ON(mt, mas.index != 0);
3222 MT_BUG_ON(mt, mas.index != 0);
3230 MT_BUG_ON(mt, mas.index != 1);
3235 mas.index = mas.last = 0;
3238 MT_BUG_ON(mt, mas.index != 0);
3256 MT_BUG_ON(mt, mas.index != 0x1000);
3265 MT_BUG_ON(mt, mas.index != 0x1000);
3270 mas.index = mas.last = 0;
3275 MT_BUG_ON(mt, mas.index != 0x1000);
3282 MT_BUG_ON(mt, mas.index != 0x2000);
3289 MT_BUG_ON(mt, mas.index != 0x2501);
3296 MT_BUG_ON(mt, mas.index != 0x3000);
3303 MT_BUG_ON(mt, mas.index != 0x3501);
3310 MT_BUG_ON(mt, mas.index != 0x3501);
3317 MT_BUG_ON(mt, mas.index != 0x3501);
3324 MT_BUG_ON(mt, mas.index != 0x3000);
3335 MT_BUG_ON(mt, mas.index != 0x2000);
3342 MT_BUG_ON(mt, mas.index != 0x1000);
3349 MT_BUG_ON(mt, mas.index != 0);
3356 MT_BUG_ON(mt, mas.index != 0);
3363 MT_BUG_ON(mt, mas.index != 0);
3370 MT_BUG_ON(mt, mas.index != 0x1000);
3377 MT_BUG_ON(mt, mas.index != 0x1000);
3384 MT_BUG_ON(mt, mas.index != 0x1000);
3395 MT_BUG_ON(mt, mas.index != 0x2000);
3402 MT_BUG_ON(mt, mas.index != 0x1501);
3409 MT_BUG_ON(mt, mas.index != 0x1000);
3417 MT_BUG_ON(mt, mas.index != 0x1000);
3426 MT_BUG_ON(mt, mas.index != 0x1000);
3434 MT_BUG_ON(mt, mas.index != 0x1000);
3441 MT_BUG_ON(mt, mas.index != 0x2000);
3449 MT_BUG_ON(mt, mas.index != 0x2501);
3456 MT_BUG_ON(mt, mas.index != 0x3000);
3463 MT_BUG_ON(mt, mas.index != 0x3501);
3470 MT_BUG_ON(mt, mas.index != 0x3000);
3477 MT_BUG_ON(mt, mas.index != 0x2000);
3485 MT_BUG_ON(mt, mas.index != 0x1000);
3492 MT_BUG_ON(mt, mas.index != 0);
3500 MT_BUG_ON(mt, mas.index != 0x1000);
3508 MT_BUG_ON(mt, mas.index != 0x1000);
3516 MT_BUG_ON(mt, mas.index != 0x1501);
3525 MT_BUG_ON(mt, mas.index != 0x1000);
3534 MT_BUG_ON(mt, mas.index != 0x1501);
3543 MT_BUG_ON(mt, mas.index != 0x1000);
3552 MT_BUG_ON(mt, mas.index != 0x1501);
3557 mas.index = 0x1200;
3562 MT_BUG_ON(mt, mas.index != 0x1000);
3567 mas.index = 0x1600;
3571 MT_BUG_ON(mt, mas.index != 0x1501);