Lines Matching full:mt
19 #define mt_dump(mt, fmt) do {} while (0) argument
20 #define mt_validate(mt) do {} while (0) argument
63 static int __init mtree_insert_index(struct maple_tree *mt, in mtree_insert_index() argument
66 return mtree_insert(mt, index, xa_mk_value(index & LONG_MAX), gfp); in mtree_insert_index()
69 static void __init mtree_erase_index(struct maple_tree *mt, unsigned long index) in mtree_erase_index() argument
71 MT_BUG_ON(mt, mtree_erase(mt, index) != xa_mk_value(index & LONG_MAX)); in mtree_erase_index()
72 MT_BUG_ON(mt, mtree_load(mt, index) != NULL); in mtree_erase_index()
75 static int __init mtree_test_insert(struct maple_tree *mt, unsigned long index, in mtree_test_insert() argument
78 return mtree_insert(mt, index, ptr, GFP_KERNEL); in mtree_test_insert()
81 static int __init mtree_test_store_range(struct maple_tree *mt, in mtree_test_store_range() argument
84 return mtree_store_range(mt, start, end, ptr, GFP_KERNEL); in mtree_test_store_range()
87 static int __init mtree_test_store(struct maple_tree *mt, unsigned long start, in mtree_test_store() argument
90 return mtree_test_store_range(mt, start, start, ptr); in mtree_test_store()
93 static int __init mtree_test_insert_range(struct maple_tree *mt, in mtree_test_insert_range() argument
96 return mtree_insert_range(mt, start, end, ptr, GFP_KERNEL); in mtree_test_insert_range()
99 static void __init *mtree_test_load(struct maple_tree *mt, unsigned long index) in mtree_test_load() argument
101 return mtree_load(mt, index); in mtree_test_load()
104 static void __init *mtree_test_erase(struct maple_tree *mt, unsigned long index) in mtree_test_erase() argument
106 return mtree_erase(mt, index); in mtree_test_erase()
110 static noinline void __init check_mtree_alloc_range(struct maple_tree *mt, in check_mtree_alloc_range() argument
118 ret = mtree_alloc_range(mt, &result, ptr, size, start, end, in check_mtree_alloc_range()
120 MT_BUG_ON(mt, ret != eret); in check_mtree_alloc_range()
124 MT_BUG_ON(mt, result != expected); in check_mtree_alloc_range()
127 static noinline void __init check_mtree_alloc_rrange(struct maple_tree *mt, in check_mtree_alloc_rrange() argument
135 ret = mtree_alloc_rrange(mt, &result, ptr, size, start, end, in check_mtree_alloc_rrange()
137 MT_BUG_ON(mt, ret != eret); in check_mtree_alloc_rrange()
141 MT_BUG_ON(mt, result != expected); in check_mtree_alloc_rrange()
145 static noinline void __init check_load(struct maple_tree *mt, in check_load() argument
148 void *ret = mtree_test_load(mt, index); in check_load()
152 MT_BUG_ON(mt, ret != ptr); in check_load()
155 static noinline void __init check_store_range(struct maple_tree *mt, in check_store_range() argument
161 ret = mtree_test_store_range(mt, start, end, ptr); in check_store_range()
162 MT_BUG_ON(mt, ret != expected); in check_store_range()
168 check_load(mt, i, ptr); in check_store_range()
171 static noinline void __init check_insert_range(struct maple_tree *mt, in check_insert_range() argument
177 ret = mtree_test_insert_range(mt, start, end, ptr); in check_insert_range()
178 MT_BUG_ON(mt, ret != expected); in check_insert_range()
184 check_load(mt, i, ptr); in check_insert_range()
187 static noinline void __init check_insert(struct maple_tree *mt, in check_insert() argument
192 ret = mtree_test_insert(mt, index, ptr); in check_insert()
193 MT_BUG_ON(mt, ret != 0); in check_insert()
196 static noinline void __init check_dup_insert(struct maple_tree *mt, in check_dup_insert() argument
201 ret = mtree_test_insert(mt, index, ptr); in check_dup_insert()
202 MT_BUG_ON(mt, ret != -EEXIST); in check_dup_insert()
206 static noinline void __init check_index_load(struct maple_tree *mt, in check_index_load() argument
209 return check_load(mt, index, xa_mk_value(index & LONG_MAX)); in check_index_load()
227 static noinline void __init check_rev_seq(struct maple_tree *mt, in check_rev_seq() argument
232 MT_BUG_ON(mt, !mtree_empty(mt)); in check_rev_seq()
236 MT_BUG_ON(mt, mtree_insert_index(mt, i, GFP_KERNEL)); in check_rev_seq()
238 check_index_load(mt, j); in check_rev_seq()
240 check_load(mt, i - 1, NULL); in check_rev_seq()
241 mt_set_in_rcu(mt); in check_rev_seq()
242 MT_BUG_ON(mt, !mt_height(mt)); in check_rev_seq()
243 mt_clear_in_rcu(mt); in check_rev_seq()
244 MT_BUG_ON(mt, !mt_height(mt)); in check_rev_seq()
247 check_load(mt, max + 1, NULL); in check_rev_seq()
252 mt_dump(mt, mt_dump_dec); in check_rev_seq()
260 static noinline void __init check_seq(struct maple_tree *mt, unsigned long max, in check_seq() argument
265 MT_BUG_ON(mt, !mtree_empty(mt)); in check_seq()
269 MT_BUG_ON(mt, mtree_insert_index(mt, i, GFP_KERNEL)); in check_seq()
271 check_index_load(mt, j); in check_seq()
274 MT_BUG_ON(mt, !mt_height(mt)); in check_seq()
275 check_load(mt, i + 1, NULL); in check_seq()
281 mt_dump(mt, mt_dump_dec); in check_seq()
289 static noinline void __init check_lb_not_empty(struct maple_tree *mt) in check_lb_not_empty() argument
297 check_insert(mt, i, (void *) i); in check_lb_not_empty()
299 check_load(mt, j-1, NULL); in check_lb_not_empty()
300 check_load(mt, j, (void *) j); in check_lb_not_empty()
301 check_load(mt, j+1, NULL); in check_lb_not_empty()
305 mtree_destroy(mt); in check_lb_not_empty()
308 static noinline void __init check_lower_bound_split(struct maple_tree *mt) in check_lower_bound_split() argument
310 MT_BUG_ON(mt, !mtree_empty(mt)); in check_lower_bound_split()
311 check_lb_not_empty(mt); in check_lower_bound_split()
314 static noinline void __init check_upper_bound_split(struct maple_tree *mt) in check_upper_bound_split() argument
319 MT_BUG_ON(mt, !mtree_empty(mt)); in check_upper_bound_split()
328 check_insert(mt, i, (void *) i); in check_upper_bound_split()
330 check_load(mt, j-1, NULL); in check_upper_bound_split()
331 check_load(mt, j, (void *) j); in check_upper_bound_split()
332 check_load(mt, j+1, NULL); in check_upper_bound_split()
336 mtree_destroy(mt); in check_upper_bound_split()
339 static noinline void __init check_mid_split(struct maple_tree *mt) in check_mid_split() argument
343 check_insert(mt, huge, (void *) huge); in check_mid_split()
344 check_insert(mt, 0, xa_mk_value(0)); in check_mid_split()
345 check_lb_not_empty(mt); in check_mid_split()
348 static noinline void __init check_rev_find(struct maple_tree *mt) in check_rev_find() argument
352 MA_STATE(mas, mt, 0, 0); in check_rev_find()
355 mtree_store_range(mt, i*10, i*10 + 5, in check_rev_find()
361 MT_BUG_ON(mt, val != xa_mk_value(100)); in check_rev_find()
363 MT_BUG_ON(mt, val != NULL); in check_rev_find()
367 MT_BUG_ON(mt, val != NULL); in check_rev_find()
371 MT_BUG_ON(mt, val != xa_mk_value(100)); in check_rev_find()
373 MT_BUG_ON(mt, val != xa_mk_value(99)); in check_rev_find()
377 MT_BUG_ON(mt, val != xa_mk_value(2)); in check_rev_find()
379 MT_BUG_ON(mt, val != xa_mk_value(1)); in check_rev_find()
381 MT_BUG_ON(mt, val != xa_mk_value(0)); in check_rev_find()
383 MT_BUG_ON(mt, val != NULL); in check_rev_find()
387 static noinline void __init check_find(struct maple_tree *mt) in check_find() argument
396 MA_STATE(mas, mt, 0, 0); in check_find()
399 MT_BUG_ON(mt, mtree_insert_index(mt, val++, GFP_KERNEL)); in check_find()
415 MT_BUG_ON(mt, mtree_insert_index(mt, val, GFP_KERNEL)); in check_find()
417 MT_BUG_ON(mt, mtree_insert(mt, val, in check_find()
428 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
430 MT_BUG_ON(mt, entry != XA_ZERO_ENTRY); in check_find()
444 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
446 MT_BUG_ON(mt, entry != XA_ZERO_ENTRY); in check_find()
460 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
462 MT_BUG_ON(mt, entry != XA_ZERO_ENTRY); in check_find()
476 mt_for_each(mt, entry, index, max) { in check_find()
477 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
489 MT_BUG_ON(mt, mtree_insert_index(mt, ULONG_MAX, GFP_KERNEL)); in check_find()
490 mt_for_each(mt, entry, index, ULONG_MAX) { in check_find()
492 MT_BUG_ON(mt, entry != xa_mk_value(LONG_MAX)); in check_find()
494 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
508 MT_BUG_ON(mt, max > 25); in check_find()
510 mtree_erase_index(mt, ULONG_MAX); in check_find()
514 entry = mt_find(mt, &index, 512); in check_find()
515 MT_BUG_ON(mt, xa_mk_value(256) != entry); in check_find()
519 entry = mt_find(mt, &index, 20); in check_find()
520 MT_BUG_ON(mt, entry != NULL); in check_find()
525 MT_BUG_ON(mt, mtree_insert_index(mt, ULONG_MAX, GFP_KERNEL)); in check_find()
532 MT_BUG_ON(mt, entry != XA_ZERO_ENTRY); in check_find()
534 MT_BUG_ON(mt, entry != xa_mk_value(LONG_MAX)); in check_find()
536 MT_BUG_ON(mt, xa_mk_value(val) != entry); in check_find()
586 MT_BUG_ON(mt, entry != entry2); in check_find()
587 MT_BUG_ON(mt, index != mas.index); in check_find()
588 MT_BUG_ON(mt, last != mas.last); in check_find()
595 MT_BUG_ON(mt, entry != entry2); in check_find()
598 MT_BUG_ON(mt, mas_prev(&mas, 0) != NULL); in check_find()
601 mtree_destroy(mt); in check_find()
604 static noinline void __init check_find_2(struct maple_tree *mt) in check_find_2() argument
609 MA_STATE(mas, mt, 0, 0); in check_find_2()
612 MT_BUG_ON(mt, true); in check_find_2()
616 mtree_insert_index(mt, i, GFP_KERNEL); in check_find_2()
621 MT_BUG_ON(mt, entry != xa_mk_value(j)); in check_find_2()
625 MT_BUG_ON(mt, j != i + 1); in check_find_2()
629 mtree_erase_index(mt, i); in check_find_2()
637 MT_BUG_ON(mt, entry != xa_mk_value(j)); in check_find_2()
641 MT_BUG_ON(mt, j != 256); in check_find_2()
644 /*MT_BUG_ON(mt, !mtree_empty(mt)); */ in check_find_2()
649 static noinline void __init check_alloc_rev_range(struct maple_tree *mt) in check_alloc_rev_range() argument
756 MA_STATE(mas, mt, 0, 0); in check_alloc_rev_range()
758 mtree_store_range(mt, MTREE_ALLOC_MAX, ULONG_MAX, XA_ZERO_ENTRY, in check_alloc_rev_range()
768 check_insert_range(mt, range[i] >> 12, (range[i + 1] >> 12) - 1, in check_alloc_rev_range()
770 mt_validate(mt); in check_alloc_rev_range()
781 MT_BUG_ON(mt, mas_empty_area_rev(&mas, min, in check_alloc_rev_range()
789 MT_BUG_ON(mt, mas.last + 1 != (holes[i+1] >> 12)); in check_alloc_rev_range()
790 MT_BUG_ON(mt, mas.index != (holes[i+1] >> 12) - (holes[i+2] >> 12)); in check_alloc_rev_range()
804 check_mtree_alloc_rrange(mt, in check_alloc_rev_range()
811 mt_validate(mt); in check_alloc_rev_range()
815 mtree_erase(mt, 34148798727); /* create a deleted range. */ in check_alloc_rev_range()
816 mtree_erase(mt, 34148798725); in check_alloc_rev_range()
817 check_mtree_alloc_rrange(mt, 0, 34359052173, 210253414, in check_alloc_rev_range()
818 34148798725, 0, mt); in check_alloc_rev_range()
820 mtree_destroy(mt); in check_alloc_rev_range()
823 static noinline void __init check_alloc_range(struct maple_tree *mt) in check_alloc_range() argument
931 MA_STATE(mas, mt, 0, 0); in check_alloc_range()
933 mtree_store_range(mt, MTREE_ALLOC_MAX, ULONG_MAX, XA_ZERO_ENTRY, in check_alloc_range()
940 mt_dump(mt, mt_dump_hex); in check_alloc_range()
942 check_insert_range(mt, range[i] >> 12, (range[i + 1] >> 12) - 1, in check_alloc_range()
944 mt_validate(mt); in check_alloc_range()
957 MT_BUG_ON(mt, mas_empty_area(&mas, min >> 12, in check_alloc_range()
960 MT_BUG_ON(mt, mas.index != holes[i] >> 12); in check_alloc_range()
972 check_mtree_alloc_range(mt, in check_alloc_range()
979 mt_validate(mt); in check_alloc_range()
981 mt_dump(mt, mt_dump_hex); in check_alloc_range()
985 mtree_destroy(mt); in check_alloc_range()
989 static noinline void __init check_ranges(struct maple_tree *mt) in check_ranges() argument
1002 MT_BUG_ON(mt, !mtree_empty(mt)); in check_ranges()
1003 check_insert_range(mt, r[0], r[1], xa_mk_value(r[0]), 0); in check_ranges()
1004 check_insert_range(mt, r[2], r[3], xa_mk_value(r[2]), 0); in check_ranges()
1005 check_insert_range(mt, r[4], r[5], xa_mk_value(r[4]), -EEXIST); in check_ranges()
1006 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1008 check_store_range(mt, r[4], r[5], xa_mk_value(r[4]), 0); in check_ranges()
1009 check_store_range(mt, r[6], r[7], xa_mk_value(r[6]), 0); in check_ranges()
1010 check_store_range(mt, r[8], r[9], xa_mk_value(r[8]), 0); in check_ranges()
1011 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1012 mtree_destroy(mt); in check_ranges()
1013 MT_BUG_ON(mt, mt_height(mt)); in check_ranges()
1015 check_seq(mt, 50, false); in check_ranges()
1017 check_store_range(mt, 5, 47, xa_mk_value(47), 0); in check_ranges()
1018 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1019 mtree_destroy(mt); in check_ranges()
1022 check_seq(mt, 100, false); in check_ranges()
1025 check_store_range(mt, r[10], r[11], xa_mk_value(r[10]), 0); in check_ranges()
1026 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1027 mtree_destroy(mt); in check_ranges()
1030 check_seq(mt, 200, false); in check_ranges()
1032 check_store_range(mt, r[10], r[11], xa_mk_value(r[10]), 0); in check_ranges()
1033 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1034 mtree_destroy(mt); in check_ranges()
1036 check_seq(mt, 30, false); in check_ranges()
1037 check_store_range(mt, 6, 18, xa_mk_value(6), 0); in check_ranges()
1038 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1039 mtree_destroy(mt); in check_ranges()
1043 check_seq(mt, 400, false); in check_ranges()
1046 check_store_range(mt, r[12], r[13], xa_mk_value(r[12]), 0); in check_ranges()
1048 mtree_test_erase(mt, 140); in check_ranges()
1049 mtree_test_erase(mt, 141); in check_ranges()
1050 mtree_test_erase(mt, 142); in check_ranges()
1051 mtree_test_erase(mt, 143); in check_ranges()
1052 mtree_test_erase(mt, 130); in check_ranges()
1053 mtree_test_erase(mt, 131); in check_ranges()
1054 mtree_test_erase(mt, 132); in check_ranges()
1055 mtree_test_erase(mt, 133); in check_ranges()
1056 mtree_test_erase(mt, 134); in check_ranges()
1057 mtree_test_erase(mt, 135); in check_ranges()
1058 check_load(mt, r[12], xa_mk_value(r[12])); in check_ranges()
1059 check_load(mt, r[13], xa_mk_value(r[12])); in check_ranges()
1060 check_load(mt, r[13] - 1, xa_mk_value(r[12])); in check_ranges()
1061 check_load(mt, r[13] + 1, xa_mk_value(r[13] + 1)); in check_ranges()
1062 check_load(mt, 135, NULL); in check_ranges()
1063 check_load(mt, 140, NULL); in check_ranges()
1065 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1066 mtree_destroy(mt); in check_ranges()
1072 check_seq(mt, 400, false); in check_ranges()
1073 check_store_range(mt, 353, 361, xa_mk_value(353), 0); in check_ranges()
1074 check_store_range(mt, 347, 352, xa_mk_value(347), 0); in check_ranges()
1076 check_load(mt, 346, xa_mk_value(346)); in check_ranges()
1078 check_load(mt, i, xa_mk_value(347)); in check_ranges()
1080 check_load(mt, i, xa_mk_value(353)); in check_ranges()
1081 check_load(mt, 362, xa_mk_value(362)); in check_ranges()
1083 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1084 mtree_destroy(mt); in check_ranges()
1087 check_seq(mt, 400, false); in check_ranges()
1088 check_store_range(mt, 352, 364, NULL, 0); in check_ranges()
1089 check_store_range(mt, 351, 363, xa_mk_value(352), 0); in check_ranges()
1090 check_load(mt, 350, xa_mk_value(350)); in check_ranges()
1091 check_load(mt, 351, xa_mk_value(352)); in check_ranges()
1093 check_load(mt, i, xa_mk_value(352)); in check_ranges()
1094 check_load(mt, 364, NULL); in check_ranges()
1095 check_load(mt, 365, xa_mk_value(365)); in check_ranges()
1097 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1098 mtree_destroy(mt); in check_ranges()
1101 check_seq(mt, 400, false); in check_ranges()
1102 check_store_range(mt, 352, 364, NULL, 0); in check_ranges()
1103 check_store_range(mt, 351, 364, xa_mk_value(352), 0); in check_ranges()
1104 check_load(mt, 350, xa_mk_value(350)); in check_ranges()
1105 check_load(mt, 351, xa_mk_value(352)); in check_ranges()
1107 check_load(mt, i, xa_mk_value(352)); in check_ranges()
1108 check_load(mt, 365, xa_mk_value(365)); in check_ranges()
1110 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1111 mtree_destroy(mt); in check_ranges()
1115 check_seq(mt, 400, false); in check_ranges()
1116 check_store_range(mt, 362, 367, xa_mk_value(362), 0); in check_ranges()
1117 check_store_range(mt, 353, 361, xa_mk_value(353), 0); in check_ranges()
1119 mt_validate(mt); in check_ranges()
1120 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1121 mtree_destroy(mt); in check_ranges()
1143 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1145 check_store_range(mt, 2400, 2400, xa_mk_value(2400), 0); in check_ranges()
1146 check_store_range(mt, 2411, 2411, xa_mk_value(2411), 0); in check_ranges()
1147 check_store_range(mt, 2412, 2412, xa_mk_value(2412), 0); in check_ranges()
1148 check_store_range(mt, 2396, 2400, xa_mk_value(4052020), 0); in check_ranges()
1149 check_store_range(mt, 2402, 2402, xa_mk_value(2402), 0); in check_ranges()
1150 mtree_destroy(mt); in check_ranges()
1157 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1159 check_store_range(mt, 2422, 2422, xa_mk_value(2422), 0); in check_ranges()
1160 check_store_range(mt, 2424, 2424, xa_mk_value(2424), 0); in check_ranges()
1161 check_store_range(mt, 2425, 2425, xa_mk_value(2), 0); in check_ranges()
1162 check_store_range(mt, 2460, 2470, NULL, 0); in check_ranges()
1163 check_store_range(mt, 2435, 2460, xa_mk_value(2435), 0); in check_ranges()
1164 check_store_range(mt, 2461, 2470, xa_mk_value(2461), 0); in check_ranges()
1166 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1167 mtree_destroy(mt); in check_ranges()
1170 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1176 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1183 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1190 MT_BUG_ON(mt, mtree_test_store_range(mt, val, ULONG_MAX, in check_ranges()
1198 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1205 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1215 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1222 mt_set_in_rcu(mt); in check_ranges()
1226 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1229 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1230 mt_validate(mt); in check_ranges()
1232 mtree_destroy(mt); in check_ranges()
1235 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1240 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1242 check_store_range(mt, 161, 161, xa_mk_value(161), 0); in check_ranges()
1243 check_store_range(mt, 162, 162, xa_mk_value(162), 0); in check_ranges()
1244 check_store_range(mt, 163, 163, xa_mk_value(163), 0); in check_ranges()
1245 check_store_range(mt, 240, 249, NULL, 0); in check_ranges()
1246 mtree_erase(mt, 200); in check_ranges()
1247 mtree_erase(mt, 210); in check_ranges()
1248 mtree_erase(mt, 220); in check_ranges()
1249 mtree_erase(mt, 230); in check_ranges()
1251 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1252 mtree_destroy(mt); in check_ranges()
1254 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1258 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1260 check_store_range(mt, 4600, 4959, xa_mk_value(1), 0); in check_ranges()
1261 mt_validate(mt); in check_ranges()
1262 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1263 mtree_destroy(mt); in check_ranges()
1265 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1269 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1271 check_store_range(mt, 4811, 4811, xa_mk_value(4811), 0); in check_ranges()
1272 check_store_range(mt, 4812, 4812, xa_mk_value(4812), 0); in check_ranges()
1273 check_store_range(mt, 4861, 4861, xa_mk_value(4861), 0); in check_ranges()
1274 check_store_range(mt, 4862, 4862, xa_mk_value(4862), 0); in check_ranges()
1275 check_store_range(mt, 4842, 4849, NULL, 0); in check_ranges()
1276 mt_validate(mt); in check_ranges()
1277 MT_BUG_ON(mt, !mt_height(mt)); in check_ranges()
1278 mtree_destroy(mt); in check_ranges()
1280 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1284 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1285 MT_BUG_ON(mt, mt_height(mt) >= 4); in check_ranges()
1289 check_store_range(mt, 11450 + i, 11450 + i + 1, NULL, 0); in check_ranges()
1291 check_store_range(mt, 11770 + i, 11770 + i + 1, NULL, 0); in check_ranges()
1293 MT_BUG_ON(mt, mt_height(mt) >= 4); in check_ranges()
1295 check_store_range(mt, 11700 + i, 11700 + i + 1, NULL, 0); in check_ranges()
1297 MT_BUG_ON(mt, mt_height(mt) < 4); in check_ranges()
1298 mtree_destroy(mt); in check_ranges()
1301 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_ranges()
1305 check_store_range(mt, val, val2, xa_mk_value(val), 0); in check_ranges()
1306 MT_BUG_ON(mt, mt_height(mt) >= 4); in check_ranges()
1310 check_store_range(mt, 7800 + i, 7800 + i + 1, NULL, 0); in check_ranges()
1313 check_store_range(mt, 8185 + i, 8185 + i + 1, in check_ranges()
1315 MT_BUG_ON(mt, mt_height(mt) >= 4); in check_ranges()
1317 check_store_range(mt, 8184, 8184, xa_mk_value(8184), 0); in check_ranges()
1319 MT_BUG_ON(mt, mt_height(mt) != 4); in check_ranges()
1322 static noinline void __init check_next_entry(struct maple_tree *mt) in check_next_entry() argument
1326 MA_STATE(mas, mt, i, i); in check_next_entry()
1328 MT_BUG_ON(mt, !mtree_empty(mt)); in check_next_entry()
1330 check_seq(mt, limit, false); in check_next_entry()
1334 MT_BUG_ON(mt, mas_walk(&mas) != xa_mk_value(i++)); in check_next_entry()
1338 MT_BUG_ON(mt, entry != NULL); in check_next_entry()
1340 MT_BUG_ON(mt, xa_mk_value(i) != entry); in check_next_entry()
1343 mtree_destroy(mt); in check_next_entry()
1346 static noinline void __init check_prev_entry(struct maple_tree *mt) in check_prev_entry() argument
1352 MA_STATE(mas, mt, index, index); in check_prev_entry()
1354 MT_BUG_ON(mt, !mtree_empty(mt)); in check_prev_entry()
1355 check_seq(mt, 30, false); in check_prev_entry()
1359 MT_BUG_ON(mt, value != xa_mk_value(index)); in check_prev_entry()
1361 MT_BUG_ON(mt, value != xa_mk_value(index - 1)); in check_prev_entry()
1363 mtree_destroy(mt); in check_prev_entry()
1366 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_prev_entry()
1375 MT_BUG_ON(mt, value != xa_mk_value(2)); in check_prev_entry()
1378 MT_BUG_ON(mt, value != NULL); in check_prev_entry()
1382 MT_BUG_ON(mt, value != xa_mk_value(8)); in check_prev_entry()
1385 MT_BUG_ON(mt, value != NULL); in check_prev_entry()
1390 static noinline void __init check_root_expand(struct maple_tree *mt) in check_root_expand() argument
1392 MA_STATE(mas, mt, 0, 0); in check_root_expand()
1399 MT_BUG_ON(mt, mas.index != 0); in check_root_expand()
1400 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1401 MT_BUG_ON(mt, mas.index != 0); in check_root_expand()
1402 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_root_expand()
1410 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1414 MT_BUG_ON(mt, ptr != &check_prev_entry); in check_root_expand()
1418 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1420 mtree_destroy(mt); in check_root_expand()
1423 mt_init_flags(mt, 0); in check_root_expand()
1432 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1433 MT_BUG_ON(mt, mas.index != 1); in check_root_expand()
1434 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_root_expand()
1438 MT_BUG_ON(mt, ptr != &check_prev_entry); in check_root_expand()
1439 MT_BUG_ON(mt, mas.last != 0); in check_root_expand()
1441 mtree_destroy(mt); in check_root_expand()
1443 mt_init_flags(mt, 0); in check_root_expand()
1450 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1451 MT_BUG_ON(mt, (mas.index != 1) && (mas.last != ULONG_MAX)); in check_root_expand()
1455 MT_BUG_ON(mt, (mas.index != 0) && (mas.last != 0)); in check_root_expand()
1456 MT_BUG_ON(mt, ptr != (void *)((unsigned long) check_prev_entry | 1UL)); in check_root_expand()
1460 mtree_destroy(mt); in check_root_expand()
1462 mt_init_flags(mt, 0); in check_root_expand()
1468 MT_BUG_ON(mt, ptr != NULL); in check_root_expand()
1469 MT_BUG_ON(mt, (mas.index != ULONG_MAX) && (mas.last != ULONG_MAX)); in check_root_expand()
1473 MT_BUG_ON(mt, (mas.index != 0) && (mas.last != 0)); in check_root_expand()
1474 MT_BUG_ON(mt, ptr != (void *)((unsigned long) check_prev_entry | 2UL)); in check_root_expand()
1480 static noinline void __init check_gap_combining(struct maple_tree *mt) in check_gap_combining() argument
1526 MA_STATE(mas, mt, 0, 0); in check_gap_combining()
1535 MT_BUG_ON(mt, !mtree_empty(mt)); in check_gap_combining()
1536 check_seq(mt, singletons, false); /* create 100 singletons. */ in check_gap_combining()
1539 mtree_test_erase(mt, seq100[2]); in check_gap_combining()
1540 check_load(mt, seq100[2], NULL); in check_gap_combining()
1541 mtree_test_erase(mt, seq100[1]); in check_gap_combining()
1542 check_load(mt, seq100[1], NULL); in check_gap_combining()
1546 MT_BUG_ON(mt, entry != xa_mk_value(index)); in check_gap_combining()
1550 MT_BUG_ON(mt, entry != xa_mk_value(index + 4)); in check_gap_combining()
1552 MT_BUG_ON(mt, mn1 == mn2); /* test the test. */ in check_gap_combining()
1560 MT_BUG_ON(mt, mas_empty_area_rev(&mas, seq100[3], seq100[4], in check_gap_combining()
1562 MT_BUG_ON(mt, mas.index != index + 1); in check_gap_combining()
1565 mtree_test_erase(mt, seq100[6]); in check_gap_combining()
1566 check_load(mt, seq100[6], NULL); in check_gap_combining()
1567 mtree_test_erase(mt, seq100[7]); in check_gap_combining()
1568 check_load(mt, seq100[7], NULL); in check_gap_combining()
1569 mtree_test_erase(mt, seq100[8]); in check_gap_combining()
1577 MT_BUG_ON(mt, entry != xa_mk_value(index)); in check_gap_combining()
1580 MT_BUG_ON(mt, entry != xa_mk_value(index + 4)); in check_gap_combining()
1583 MT_BUG_ON(mt, mn1 == mn2); /* test the next entry is in the next node. */ in check_gap_combining()
1590 MT_BUG_ON(mt, mas_empty_area_rev(&mas, seq100[10], seq100[11], in check_gap_combining()
1592 MT_BUG_ON(mt, mas.index != seq100[6]); in check_gap_combining()
1596 mtree_store(mt, seq100[13], NULL, GFP_KERNEL); in check_gap_combining()
1597 check_load(mt, seq100[13], NULL); in check_gap_combining()
1598 check_load(mt, seq100[14], xa_mk_value(seq100[14])); in check_gap_combining()
1599 mtree_store(mt, seq100[14], NULL, GFP_KERNEL); in check_gap_combining()
1600 check_load(mt, seq100[13], NULL); in check_gap_combining()
1601 check_load(mt, seq100[14], NULL); in check_gap_combining()
1605 MT_BUG_ON(mt, mas_empty_area_rev(&mas, seq100[16], seq100[15], in check_gap_combining()
1607 MT_BUG_ON(mt, mas.index != seq100[13]); in check_gap_combining()
1608 mt_validate(mt); in check_gap_combining()
1616 mtree_test_store_range(mt, seq100[18], seq100[14], NULL); in check_gap_combining()
1617 mtree_test_erase(mt, seq100[15]); in check_gap_combining()
1620 MT_BUG_ON(mt, mas_empty_area_rev(&mas, seq100[16], seq100[19], in check_gap_combining()
1623 MT_BUG_ON(mt, mas.index != seq100[18]); in check_gap_combining()
1624 mt_validate(mt); in check_gap_combining()
1625 mtree_destroy(mt); in check_gap_combining()
1628 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_gap_combining()
1629 check_seq(mt, 2000, false); in check_gap_combining()
1631 mtree_test_erase(mt, seq2000[0]); in check_gap_combining()
1632 mtree_test_erase(mt, seq2000[1]); in check_gap_combining()
1637 MT_BUG_ON(mt, mas_empty_area_rev(&mas, seq2000[2], seq2000[3], in check_gap_combining()
1639 MT_BUG_ON(mt, mas.index != seq2000[1]); in check_gap_combining()
1641 mt_validate(mt); in check_gap_combining()
1642 mtree_destroy(mt); in check_gap_combining()
1646 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_gap_combining()
1647 check_seq(mt, 400, false); in check_gap_combining()
1648 mtree_test_store_range(mt, seq400[0], seq400[1], NULL); in check_gap_combining()
1650 mtree_destroy(mt); in check_gap_combining()
1652 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_gap_combining()
1653 check_seq(mt, 400, false); in check_gap_combining()
1655 mtree_test_store_range(mt, seq400[2], seq400[9], in check_gap_combining()
1657 mtree_test_store_range(mt, seq400[3], seq400[9], in check_gap_combining()
1659 mtree_test_store_range(mt, seq400[4], seq400[9], in check_gap_combining()
1661 mtree_test_store_range(mt, seq400[5], seq400[9], in check_gap_combining()
1663 mtree_test_store_range(mt, seq400[0], seq400[9], in check_gap_combining()
1665 mtree_test_store_range(mt, seq400[6], seq400[9], in check_gap_combining()
1667 mtree_test_store_range(mt, seq400[7], seq400[9], in check_gap_combining()
1669 mtree_test_store_range(mt, seq400[8], seq400[9], in check_gap_combining()
1671 mtree_test_store_range(mt, seq400[10], seq400[11], in check_gap_combining()
1673 mt_validate(mt); in check_gap_combining()
1675 mtree_destroy(mt); in check_gap_combining()
1677 static noinline void __init check_node_overwrite(struct maple_tree *mt) in check_node_overwrite() argument
1682 mtree_test_store_range(mt, i*100, i*100 + 50, xa_mk_value(i*100)); in check_node_overwrite()
1684 mtree_test_store_range(mt, 319951, 367950, NULL); in check_node_overwrite()
1685 /*mt_dump(mt, mt_dump_dec); */ in check_node_overwrite()
1686 mt_validate(mt); in check_node_overwrite()
1690 static noinline void __init bench_slot_store(struct maple_tree *mt) in bench_slot_store() argument
1695 mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL); in bench_slot_store()
1698 mtree_store_range(mt, brk, brk, NULL, GFP_KERNEL); in bench_slot_store()
1699 mtree_store_range(mt, brk_start, brk, xa_mk_value(brk), in bench_slot_store()
1706 static noinline void __init bench_node_store(struct maple_tree *mt) in bench_node_store() argument
1711 mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL); in bench_node_store()
1714 mtree_store_range(mt, overwrite, overwrite + 15, in bench_node_store()
1725 static noinline void __init bench_awalk(struct maple_tree *mt) in bench_awalk() argument
1728 MA_STATE(mas, mt, 1470, 1470); in bench_awalk()
1731 mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL); in bench_awalk()
1733 mtree_store_range(mt, 1470, 1475, NULL, GFP_KERNEL); in bench_awalk()
1742 static noinline void __init bench_walk(struct maple_tree *mt) in bench_walk() argument
1745 MA_STATE(mas, mt, 1470, 1470); in bench_walk()
1748 mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL); in bench_walk()
1759 static noinline void __init bench_load(struct maple_tree *mt) in bench_load() argument
1764 mtree_store_range(mt, i, i + 5, xa_mk_value(i), GFP_KERNEL); in bench_load()
1767 mtree_load(mt, 1470); in bench_load()
1772 static noinline void __init bench_mt_for_each(struct maple_tree *mt) in bench_mt_for_each() argument
1779 mtree_store_range(mt, i, i + 4, xa_mk_value(i), GFP_KERNEL); in bench_mt_for_each()
1784 mt_for_each(mt, entry, index, max) { in bench_mt_for_each()
1785 MT_BUG_ON(mt, entry != xa_mk_value(j)); in bench_mt_for_each()
1796 static noinline void __init bench_mas_for_each(struct maple_tree *mt) in bench_mas_for_each() argument
1801 MA_STATE(mas, mt, 0, 0); in bench_mas_for_each()
1808 mtree_store_range(mt, i, i + gap, xa_mk_value(i), GFP_KERNEL); in bench_mas_for_each()
1816 MT_BUG_ON(mt, entry != xa_mk_value(j)); in bench_mas_for_each()
1826 static noinline void __init bench_mas_prev(struct maple_tree *mt) in bench_mas_prev() argument
1831 MA_STATE(mas, mt, 0, 0); in bench_mas_prev()
1838 mtree_store_range(mt, i, i + gap, xa_mk_value(i), GFP_KERNEL); in bench_mas_prev()
1847 MT_BUG_ON(mt, entry != xa_mk_value(j)); in bench_mas_prev()
1858 struct maple_tree mt, newmt; in check_forking() local
1861 MA_STATE(mas, &mt, 0, 0); in check_forking()
1868 mt_init_flags(&mt, MT_FLAGS_ALLOC_RANGE | MT_FLAGS_LOCK_EXTERN); in check_forking()
1869 mt_set_external_lock(&mt, &mt_lock); in check_forking()
1881 ret = __mt_dup(&mt, &newmt, GFP_KERNEL); in check_forking()
1895 __mt_destroy(&mt); in check_forking()
1900 static noinline void __init check_iteration(struct maple_tree *mt) in check_iteration() argument
1904 MA_STATE(mas, mt, 0, 0); in check_iteration()
1907 mtree_store_range(mt, i * 10, i * 10 + 9, in check_iteration()
1915 MT_BUG_ON(mt, mas.index != i * 10); in check_iteration()
1916 MT_BUG_ON(mt, mas.last != i * 10 + 9); in check_iteration()
1927 MT_BUG_ON(mt, val != xa_mk_value(i)); in check_iteration()
1932 MT_BUG_ON(mt, mas.index != i * 10); in check_iteration()
1933 MT_BUG_ON(mt, mas.last != i * 10 + 9); in check_iteration()
1944 MT_BUG_ON(mt, val != xa_mk_value(i)); in check_iteration()
1949 MT_BUG_ON(mt, mas.index != i * 10); in check_iteration()
1950 MT_BUG_ON(mt, mas.last != i * 10 + 9); in check_iteration()
1961 MT_BUG_ON(mt, val != xa_mk_value(76)); in check_iteration()
1967 static noinline void __init check_mas_store_gfp(struct maple_tree *mt) in check_mas_store_gfp() argument
1973 MA_STATE(mas, mt, 0, 0); in check_mas_store_gfp()
1974 MA_STATE(newmas, mt, 0, 0); in check_mas_store_gfp()
1977 mtree_store_range(mt, i*10, i*10 + 5, in check_mas_store_gfp()
2002 struct maple_tree mt, newmt; in bench_forking() local
2005 MA_STATE(mas, &mt, 0, 0); in bench_forking()
2012 mt_init_flags(&mt, MT_FLAGS_ALLOC_RANGE | MT_FLAGS_LOCK_EXTERN); in bench_forking()
2013 mt_set_external_lock(&mt, &mt_lock); in bench_forking()
2027 ret = __mt_dup(&mt, &newmt, GFP_KERNEL); in bench_forking()
2043 __mt_destroy(&mt); in bench_forking()
2048 static noinline void __init next_prev_test(struct maple_tree *mt) in next_prev_test() argument
2052 MA_STATE(mas, mt, 0, 0); in next_prev_test()
2072 mtree_store_range(mt, i*10, i*10 + 5, in next_prev_test()
2105 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2108 MT_BUG_ON(mt, val != xa_mk_value(690 / 10)); in next_prev_test()
2109 MT_BUG_ON(mt, mas.index != 690); in next_prev_test()
2110 MT_BUG_ON(mt, mas.last != 695); in next_prev_test()
2113 MT_BUG_ON(mt, val != xa_mk_value(680 / 10)); in next_prev_test()
2114 MT_BUG_ON(mt, mas.index != 680); in next_prev_test()
2115 MT_BUG_ON(mt, mas.last != 685); in next_prev_test()
2118 MT_BUG_ON(mt, val != xa_mk_value(690 / 10)); in next_prev_test()
2119 MT_BUG_ON(mt, mas.index != 690); in next_prev_test()
2120 MT_BUG_ON(mt, mas.last != 695); in next_prev_test()
2123 MT_BUG_ON(mt, val != xa_mk_value(700 / 10)); in next_prev_test()
2124 MT_BUG_ON(mt, mas.index != 700); in next_prev_test()
2125 MT_BUG_ON(mt, mas.last != 705); in next_prev_test()
2130 MT_BUG_ON(mt, val != xa_mk_value(70 / 10)); in next_prev_test()
2131 MT_BUG_ON(mt, mas.index != 70); in next_prev_test()
2132 MT_BUG_ON(mt, mas.last != 75); in next_prev_test()
2135 MT_BUG_ON(mt, val != xa_mk_value(80 / 10)); in next_prev_test()
2136 MT_BUG_ON(mt, mas.index != 80); in next_prev_test()
2137 MT_BUG_ON(mt, mas.last != 85); in next_prev_test()
2140 MT_BUG_ON(mt, val != xa_mk_value(70 / 10)); in next_prev_test()
2141 MT_BUG_ON(mt, mas.index != 70); in next_prev_test()
2142 MT_BUG_ON(mt, mas.last != 75); in next_prev_test()
2148 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2150 MT_BUG_ON(mt, val != xa_mk_value(level2[2] / 10)); in next_prev_test()
2151 MT_BUG_ON(mt, mas.index != level2[2]); in next_prev_test()
2152 MT_BUG_ON(mt, mas.last != level2[3]); in next_prev_test()
2156 MT_BUG_ON(mt, val != xa_mk_value(level2[4] / 10)); in next_prev_test()
2157 MT_BUG_ON(mt, mas.index != level2[4]); in next_prev_test()
2158 MT_BUG_ON(mt, mas.last != level2[5]); in next_prev_test()
2159 MT_BUG_ON(mt, mn == mas.node); in next_prev_test()
2162 MT_BUG_ON(mt, val != xa_mk_value(level2[2] / 10)); in next_prev_test()
2163 MT_BUG_ON(mt, mas.index != level2[2]); in next_prev_test()
2164 MT_BUG_ON(mt, mas.last != level2[3]); in next_prev_test()
2169 MT_BUG_ON(mt, val != xa_mk_value(nr_entries)); in next_prev_test()
2170 MT_BUG_ON(mt, mas.index != (nr_entries * 10)); in next_prev_test()
2171 MT_BUG_ON(mt, mas.last != (nr_entries * 10 + 5)); in next_prev_test()
2174 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2175 MT_BUG_ON(mt, mas.index != last_index); in next_prev_test()
2176 MT_BUG_ON(mt, mas.last != ULONG_MAX); in next_prev_test()
2179 MT_BUG_ON(mt, val != xa_mk_value(nr_entries)); in next_prev_test()
2180 MT_BUG_ON(mt, mas.index != (nr_entries * 10)); in next_prev_test()
2181 MT_BUG_ON(mt, mas.last != (nr_entries * 10 + 5)); in next_prev_test()
2187 MT_BUG_ON(mt, val != xa_mk_value(1)); in next_prev_test()
2188 MT_BUG_ON(mt, mas.index != 10); in next_prev_test()
2189 MT_BUG_ON(mt, mas.last != 15); in next_prev_test()
2192 MT_BUG_ON(mt, val != xa_mk_value(0)); in next_prev_test()
2193 MT_BUG_ON(mt, mas.index != 0); in next_prev_test()
2194 MT_BUG_ON(mt, mas.last != 5); in next_prev_test()
2197 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2198 MT_BUG_ON(mt, mas.index != 0); in next_prev_test()
2199 MT_BUG_ON(mt, mas.last != 5); in next_prev_test()
2200 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in next_prev_test()
2210 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2211 MT_BUG_ON(mt, mas.index != 0); in next_prev_test()
2212 MT_BUG_ON(mt, mas.last != 9); in next_prev_test()
2215 mtree_destroy(mt); in next_prev_test()
2217 mt_init(mt); in next_prev_test()
2218 mtree_store_range(mt, 0, 0, xa_mk_value(0), GFP_KERNEL); in next_prev_test()
2219 mtree_store_range(mt, 5, 5, xa_mk_value(5), GFP_KERNEL); in next_prev_test()
2223 MT_BUG_ON(mt, val != NULL); in next_prev_test()
2230 static noinline void __init check_spanning_relatives(struct maple_tree *mt) in check_spanning_relatives() argument
2236 mtree_store_range(mt, i*10, i*10 + 5, in check_spanning_relatives()
2240 mtree_store_range(mt, 9365, 9955, NULL, GFP_KERNEL); in check_spanning_relatives()
2243 static noinline void __init check_fuzzer(struct maple_tree *mt) in check_fuzzer() argument
2250 mtree_test_insert(mt, 88, (void *)0xb1); in check_fuzzer()
2251 mtree_test_insert(mt, 84, (void *)0xa9); in check_fuzzer()
2252 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2253 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2254 mtree_test_insert(mt, 14, (void *)0x1d); in check_fuzzer()
2255 mtree_test_insert(mt, 7, (void *)0xf); in check_fuzzer()
2256 mtree_test_insert(mt, 12, (void *)0x19); in check_fuzzer()
2257 mtree_test_insert(mt, 18, (void *)0x25); in check_fuzzer()
2258 mtree_test_store_range(mt, 8, 18, (void *)0x11); in check_fuzzer()
2259 mtree_destroy(mt); in check_fuzzer()
2266 mt_init_flags(mt, 0); in check_fuzzer()
2267 mtree_test_store(mt, 87, (void *)0xaf); in check_fuzzer()
2268 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2269 mtree_test_load(mt, 4); in check_fuzzer()
2270 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2271 mtree_test_store(mt, 8, (void *)0x11); in check_fuzzer()
2272 mtree_test_store(mt, 44, (void *)0x59); in check_fuzzer()
2273 mtree_test_store(mt, 68, (void *)0x89); in check_fuzzer()
2274 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2275 mtree_test_insert(mt, 43, (void *)0x57); in check_fuzzer()
2276 mtree_test_insert(mt, 24, (void *)0x31); in check_fuzzer()
2277 mtree_test_insert(mt, 844, (void *)0x699); in check_fuzzer()
2278 mtree_test_store(mt, 84, (void *)0xa9); in check_fuzzer()
2279 mtree_test_store(mt, 4, (void *)0x9); in check_fuzzer()
2280 mtree_test_erase(mt, 4); in check_fuzzer()
2281 mtree_test_load(mt, 5); in check_fuzzer()
2282 mtree_test_erase(mt, 0); in check_fuzzer()
2283 mtree_destroy(mt); in check_fuzzer()
2290 mt_init_flags(mt, 0); in check_fuzzer()
2291 mtree_test_store_range(mt, 0, ULONG_MAX, (void *)0x1); in check_fuzzer()
2292 mtree_test_store(mt, 4, (void *)0x9); in check_fuzzer()
2293 mtree_test_erase(mt, 5); in check_fuzzer()
2294 mtree_test_erase(mt, 0); in check_fuzzer()
2295 mtree_test_erase(mt, 4); in check_fuzzer()
2296 mtree_test_store(mt, 5, (void *)0xb); in check_fuzzer()
2297 mtree_test_erase(mt, 5); in check_fuzzer()
2298 mtree_test_store(mt, 5, (void *)0xb); in check_fuzzer()
2299 mtree_test_erase(mt, 5); in check_fuzzer()
2300 mtree_test_erase(mt, 4); in check_fuzzer()
2301 mtree_test_store(mt, 4, (void *)0x9); in check_fuzzer()
2302 mtree_test_store(mt, 444, (void *)0x379); in check_fuzzer()
2303 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2304 mtree_test_load(mt, 0); in check_fuzzer()
2305 mtree_test_store(mt, 5, (void *)0xb); in check_fuzzer()
2306 mtree_test_erase(mt, 0); in check_fuzzer()
2307 mtree_destroy(mt); in check_fuzzer()
2315 mt_init_flags(mt, 0); in check_fuzzer()
2316 mtree_test_insert(mt, 261, (void *)0x20b); in check_fuzzer()
2317 mtree_test_store(mt, 516, (void *)0x409); in check_fuzzer()
2318 mtree_test_store(mt, 6, (void *)0xd); in check_fuzzer()
2319 mtree_test_insert(mt, 5, (void *)0xb); in check_fuzzer()
2320 mtree_test_insert(mt, 1256, (void *)0x9d1); in check_fuzzer()
2321 mtree_test_store(mt, 4, (void *)0x9); in check_fuzzer()
2322 mtree_test_erase(mt, 1); in check_fuzzer()
2323 mtree_test_store(mt, 56, (void *)0x71); in check_fuzzer()
2324 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2325 mtree_test_store(mt, 24, (void *)0x31); in check_fuzzer()
2326 mtree_test_erase(mt, 1); in check_fuzzer()
2327 mtree_test_insert(mt, 2263, (void *)0x11af); in check_fuzzer()
2328 mtree_test_insert(mt, 446, (void *)0x37d); in check_fuzzer()
2329 mtree_test_store_range(mt, 6, 45, (void *)0xd); in check_fuzzer()
2330 mtree_test_store_range(mt, 3, 446, (void *)0x7); in check_fuzzer()
2331 mtree_destroy(mt); in check_fuzzer()
2337 mt_init_flags(mt, 0); in check_fuzzer()
2338 mtree_test_store(mt, 48, (void *)0x61); in check_fuzzer()
2339 mtree_test_store(mt, 3, (void *)0x7); in check_fuzzer()
2340 mtree_test_load(mt, 0); in check_fuzzer()
2341 mtree_test_store(mt, 88, (void *)0xb1); in check_fuzzer()
2342 mtree_test_store(mt, 81, (void *)0xa3); in check_fuzzer()
2343 mtree_test_insert(mt, 0, (void *)0x1); in check_fuzzer()
2344 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2345 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2346 mtree_test_insert(mt, 2480, (void *)0x1361); in check_fuzzer()
2347 mtree_test_insert(mt, ULONG_MAX, in check_fuzzer()
2349 mtree_test_erase(mt, ULONG_MAX); in check_fuzzer()
2350 mtree_destroy(mt); in check_fuzzer()
2359 mt_init_flags(mt, 0); in check_fuzzer()
2360 mtree_test_erase(mt, 3); in check_fuzzer()
2361 mtree_test_insert(mt, 22, (void *)0x2d); in check_fuzzer()
2362 mtree_test_insert(mt, 15, (void *)0x1f); in check_fuzzer()
2363 mtree_test_load(mt, 2); in check_fuzzer()
2364 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2365 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2366 mtree_test_insert(mt, 5, (void *)0xb); in check_fuzzer()
2367 mtree_test_erase(mt, 1); in check_fuzzer()
2368 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2369 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2370 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2371 mtree_test_erase(mt, 1); in check_fuzzer()
2372 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2373 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2374 mtree_test_erase(mt, 3); in check_fuzzer()
2375 mtree_test_insert(mt, 22, (void *)0x2d); in check_fuzzer()
2376 mtree_test_insert(mt, 15, (void *)0x1f); in check_fuzzer()
2377 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2378 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2379 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2380 mtree_test_load(mt, 2); in check_fuzzer()
2381 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2382 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2383 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2384 mtree_test_insert(mt, 5, (void *)0xb); in check_fuzzer()
2385 mtree_test_erase(mt, 1); in check_fuzzer()
2386 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2387 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2388 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2389 mtree_test_erase(mt, 1); in check_fuzzer()
2390 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2391 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2392 mtree_test_erase(mt, 3); in check_fuzzer()
2393 mtree_test_insert(mt, 22, (void *)0x2d); in check_fuzzer()
2394 mtree_test_insert(mt, 15, (void *)0x1f); in check_fuzzer()
2395 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2396 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2397 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2398 mtree_test_insert(mt, 12, (void *)0x19); in check_fuzzer()
2399 mtree_test_erase(mt, 1); in check_fuzzer()
2400 mtree_test_store_range(mt, 4, 62, (void *)0x9); in check_fuzzer()
2401 mtree_test_erase(mt, 62); in check_fuzzer()
2402 mtree_test_store_range(mt, 1, 0, (void *)0x3); in check_fuzzer()
2403 mtree_test_insert(mt, 11, (void *)0x17); in check_fuzzer()
2404 mtree_test_insert(mt, 3, (void *)0x7); in check_fuzzer()
2405 mtree_test_insert(mt, 3, (void *)0x7); in check_fuzzer()
2406 mtree_test_store(mt, 62, (void *)0x7d); in check_fuzzer()
2407 mtree_test_erase(mt, 62); in check_fuzzer()
2408 mtree_test_store_range(mt, 1, 15, (void *)0x3); in check_fuzzer()
2409 mtree_test_erase(mt, 1); in check_fuzzer()
2410 mtree_test_insert(mt, 22, (void *)0x2d); in check_fuzzer()
2411 mtree_test_insert(mt, 12, (void *)0x19); in check_fuzzer()
2412 mtree_test_erase(mt, 1); in check_fuzzer()
2413 mtree_test_insert(mt, 3, (void *)0x7); in check_fuzzer()
2414 mtree_test_store(mt, 62, (void *)0x7d); in check_fuzzer()
2415 mtree_test_erase(mt, 62); in check_fuzzer()
2416 mtree_test_insert(mt, 122, (void *)0xf5); in check_fuzzer()
2417 mtree_test_store(mt, 3, (void *)0x7); in check_fuzzer()
2418 mtree_test_insert(mt, 0, (void *)0x1); in check_fuzzer()
2419 mtree_test_store_range(mt, 0, 1, (void *)0x1); in check_fuzzer()
2420 mtree_test_insert(mt, 85, (void *)0xab); in check_fuzzer()
2421 mtree_test_insert(mt, 72, (void *)0x91); in check_fuzzer()
2422 mtree_test_insert(mt, 81, (void *)0xa3); in check_fuzzer()
2423 mtree_test_insert(mt, 726, (void *)0x5ad); in check_fuzzer()
2424 mtree_test_insert(mt, 0, (void *)0x1); in check_fuzzer()
2425 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2426 mtree_test_store(mt, 51, (void *)0x67); in check_fuzzer()
2427 mtree_test_insert(mt, 611, (void *)0x4c7); in check_fuzzer()
2428 mtree_test_insert(mt, 485, (void *)0x3cb); in check_fuzzer()
2429 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2430 mtree_test_erase(mt, 1); in check_fuzzer()
2431 mtree_test_insert(mt, 0, (void *)0x1); in check_fuzzer()
2432 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2433 mtree_test_insert_range(mt, 26, 1, (void *)0x35); in check_fuzzer()
2434 mtree_test_load(mt, 1); in check_fuzzer()
2435 mtree_test_store_range(mt, 1, 22, (void *)0x3); in check_fuzzer()
2436 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2437 mtree_test_erase(mt, 1); in check_fuzzer()
2438 mtree_test_load(mt, 53); in check_fuzzer()
2439 mtree_test_load(mt, 1); in check_fuzzer()
2440 mtree_test_store_range(mt, 1, 1, (void *)0x3); in check_fuzzer()
2441 mtree_test_insert(mt, 222, (void *)0x1bd); in check_fuzzer()
2442 mtree_test_insert(mt, 485, (void *)0x3cb); in check_fuzzer()
2443 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2444 mtree_test_erase(mt, 1); in check_fuzzer()
2445 mtree_test_load(mt, 0); in check_fuzzer()
2446 mtree_test_insert(mt, 21, (void *)0x2b); in check_fuzzer()
2447 mtree_test_insert(mt, 3, (void *)0x7); in check_fuzzer()
2448 mtree_test_store(mt, 621, (void *)0x4db); in check_fuzzer()
2449 mtree_test_insert(mt, 0, (void *)0x1); in check_fuzzer()
2450 mtree_test_erase(mt, 5); in check_fuzzer()
2451 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2452 mtree_test_store(mt, 62, (void *)0x7d); in check_fuzzer()
2453 mtree_test_erase(mt, 62); in check_fuzzer()
2454 mtree_test_store_range(mt, 1, 0, (void *)0x3); in check_fuzzer()
2455 mtree_test_insert(mt, 22, (void *)0x2d); in check_fuzzer()
2456 mtree_test_insert(mt, 12, (void *)0x19); in check_fuzzer()
2457 mtree_test_erase(mt, 1); in check_fuzzer()
2458 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2459 mtree_test_store_range(mt, 4, 62, (void *)0x9); in check_fuzzer()
2460 mtree_test_erase(mt, 62); in check_fuzzer()
2461 mtree_test_erase(mt, 1); in check_fuzzer()
2462 mtree_test_load(mt, 1); in check_fuzzer()
2463 mtree_test_store_range(mt, 1, 22, (void *)0x3); in check_fuzzer()
2464 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2465 mtree_test_erase(mt, 1); in check_fuzzer()
2466 mtree_test_load(mt, 53); in check_fuzzer()
2467 mtree_test_load(mt, 1); in check_fuzzer()
2468 mtree_test_store_range(mt, 1, 1, (void *)0x3); in check_fuzzer()
2469 mtree_test_insert(mt, 222, (void *)0x1bd); in check_fuzzer()
2470 mtree_test_insert(mt, 485, (void *)0x3cb); in check_fuzzer()
2471 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2472 mtree_test_erase(mt, 1); in check_fuzzer()
2473 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2474 mtree_test_load(mt, 0); in check_fuzzer()
2475 mtree_test_load(mt, 0); in check_fuzzer()
2476 mtree_destroy(mt); in check_fuzzer()
2482 mt_init_flags(mt, 0); in check_fuzzer()
2483 mtree_test_load(mt, 1); in check_fuzzer()
2484 mtree_test_insert(mt, 102, (void *)0xcd); in check_fuzzer()
2485 mtree_test_erase(mt, 2); in check_fuzzer()
2486 mtree_test_erase(mt, 0); in check_fuzzer()
2487 mtree_test_load(mt, 0); in check_fuzzer()
2488 mtree_test_insert(mt, 4, (void *)0x9); in check_fuzzer()
2489 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2490 mtree_test_insert(mt, 110, (void *)0xdd); in check_fuzzer()
2491 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2492 mtree_test_insert_range(mt, 5, 0, (void *)0xb); in check_fuzzer()
2493 mtree_test_erase(mt, 2); in check_fuzzer()
2494 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2495 mtree_test_store(mt, 112, (void *)0xe1); in check_fuzzer()
2496 mtree_test_insert(mt, 21, (void *)0x2b); in check_fuzzer()
2497 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2498 mtree_test_insert_range(mt, 110, 2, (void *)0xdd); in check_fuzzer()
2499 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2500 mtree_test_load(mt, 22); in check_fuzzer()
2501 mtree_test_erase(mt, 2); in check_fuzzer()
2502 mtree_test_store(mt, 210, (void *)0x1a5); in check_fuzzer()
2503 mtree_test_store_range(mt, 0, 2, (void *)0x1); in check_fuzzer()
2504 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2505 mtree_test_erase(mt, 2); in check_fuzzer()
2506 mtree_test_erase(mt, 22); in check_fuzzer()
2507 mtree_test_erase(mt, 1); in check_fuzzer()
2508 mtree_test_erase(mt, 2); in check_fuzzer()
2509 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2510 mtree_test_load(mt, 112); in check_fuzzer()
2511 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2512 mtree_test_erase(mt, 2); in check_fuzzer()
2513 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2514 mtree_test_insert_range(mt, 1, 2, (void *)0x3); in check_fuzzer()
2515 mtree_test_erase(mt, 0); in check_fuzzer()
2516 mtree_test_erase(mt, 2); in check_fuzzer()
2517 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2518 mtree_test_erase(mt, 0); in check_fuzzer()
2519 mtree_test_erase(mt, 2); in check_fuzzer()
2520 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2521 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2522 mtree_test_erase(mt, 2); in check_fuzzer()
2523 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2524 mtree_test_erase(mt, 2); in check_fuzzer()
2525 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2526 mtree_test_insert_range(mt, 1, 2, (void *)0x3); in check_fuzzer()
2527 mtree_test_erase(mt, 0); in check_fuzzer()
2528 mtree_test_erase(mt, 2); in check_fuzzer()
2529 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2530 mtree_test_load(mt, 112); in check_fuzzer()
2531 mtree_test_store_range(mt, 110, 12, (void *)0xdd); in check_fuzzer()
2532 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2533 mtree_test_load(mt, 110); in check_fuzzer()
2534 mtree_test_insert_range(mt, 4, 71, (void *)0x9); in check_fuzzer()
2535 mtree_test_load(mt, 2); in check_fuzzer()
2536 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2537 mtree_test_insert_range(mt, 11, 22, (void *)0x17); in check_fuzzer()
2538 mtree_test_erase(mt, 12); in check_fuzzer()
2539 mtree_test_store(mt, 2, (void *)0x5); in check_fuzzer()
2540 mtree_test_load(mt, 22); in check_fuzzer()
2541 mtree_destroy(mt); in check_fuzzer()
2550 mt_init_flags(mt, 0); in check_fuzzer()
2551 mtree_test_store(mt, 6, (void *)0xd); in check_fuzzer()
2552 mtree_test_store(mt, 67, (void *)0x87); in check_fuzzer()
2553 mtree_test_insert(mt, 15, (void *)0x1f); in check_fuzzer()
2554 mtree_test_insert(mt, 6716, (void *)0x3479); in check_fuzzer()
2555 mtree_test_store(mt, 61, (void *)0x7b); in check_fuzzer()
2556 mtree_test_insert(mt, 13, (void *)0x1b); in check_fuzzer()
2557 mtree_test_store(mt, 8, (void *)0x11); in check_fuzzer()
2558 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2559 mtree_test_load(mt, 0); in check_fuzzer()
2560 mtree_test_erase(mt, 67167); in check_fuzzer()
2561 mtree_test_insert_range(mt, 6, 7167, (void *)0xd); in check_fuzzer()
2562 mtree_test_insert(mt, 6, (void *)0xd); in check_fuzzer()
2563 mtree_test_erase(mt, 67); in check_fuzzer()
2564 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2565 mtree_test_erase(mt, 667167); in check_fuzzer()
2566 mtree_test_insert(mt, 6, (void *)0xd); in check_fuzzer()
2567 mtree_test_store(mt, 67, (void *)0x87); in check_fuzzer()
2568 mtree_test_insert(mt, 5, (void *)0xb); in check_fuzzer()
2569 mtree_test_erase(mt, 1); in check_fuzzer()
2570 mtree_test_insert(mt, 6, (void *)0xd); in check_fuzzer()
2571 mtree_test_erase(mt, 67); in check_fuzzer()
2572 mtree_test_insert(mt, 15, (void *)0x1f); in check_fuzzer()
2573 mtree_test_insert(mt, 67167, (void *)0x20cbf); in check_fuzzer()
2574 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2575 mtree_test_load(mt, 7); in check_fuzzer()
2576 mtree_test_insert(mt, 16, (void *)0x21); in check_fuzzer()
2577 mtree_test_insert(mt, 36, (void *)0x49); in check_fuzzer()
2578 mtree_test_store(mt, 67, (void *)0x87); in check_fuzzer()
2579 mtree_test_store(mt, 6, (void *)0xd); in check_fuzzer()
2580 mtree_test_insert(mt, 367, (void *)0x2df); in check_fuzzer()
2581 mtree_test_insert(mt, 115, (void *)0xe7); in check_fuzzer()
2582 mtree_test_store(mt, 0, (void *)0x1); in check_fuzzer()
2583 mtree_test_store_range(mt, 1, 3, (void *)0x3); in check_fuzzer()
2584 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2585 mtree_test_erase(mt, 67167); in check_fuzzer()
2586 mtree_test_insert_range(mt, 6, 47, (void *)0xd); in check_fuzzer()
2587 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2588 mtree_test_insert_range(mt, 1, 67, (void *)0x3); in check_fuzzer()
2589 mtree_test_load(mt, 67); in check_fuzzer()
2590 mtree_test_insert(mt, 1, (void *)0x3); in check_fuzzer()
2591 mtree_test_erase(mt, 67167); in check_fuzzer()
2592 mtree_destroy(mt); in check_fuzzer()
2602 mt_init_flags(mt, 0); in check_fuzzer()
2603 mtree_test_insert(mt, 21, (void *)0x2b); in check_fuzzer()
2604 mtree_test_insert(mt, 12, (void *)0x19); in check_fuzzer()
2605 mtree_test_insert(mt, 6, (void *)0xd); in check_fuzzer()
2606 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2607 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2608 mtree_test_insert(mt, 91, (void *)0xb7); in check_fuzzer()
2609 mtree_test_insert(mt, 18, (void *)0x25); in check_fuzzer()
2610 mtree_test_insert(mt, 81, (void *)0xa3); in check_fuzzer()
2611 mtree_test_store_range(mt, 0, 128, (void *)0x1); in check_fuzzer()
2612 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2613 mtree_test_erase(mt, 8); in check_fuzzer()
2614 mtree_test_insert(mt, 11, (void *)0x17); in check_fuzzer()
2615 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2616 mtree_test_insert(mt, 21, (void *)0x2b); in check_fuzzer()
2617 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2618 mtree_test_insert(mt, ULONG_MAX - 10, (void *)0xffffffffffffffeb); in check_fuzzer()
2619 mtree_test_erase(mt, ULONG_MAX - 10); in check_fuzzer()
2620 mtree_test_store_range(mt, 0, 281, (void *)0x1); in check_fuzzer()
2621 mtree_test_erase(mt, 2); in check_fuzzer()
2622 mtree_test_insert(mt, 1211, (void *)0x977); in check_fuzzer()
2623 mtree_test_insert(mt, 111, (void *)0xdf); in check_fuzzer()
2624 mtree_test_insert(mt, 13, (void *)0x1b); in check_fuzzer()
2625 mtree_test_insert(mt, 211, (void *)0x1a7); in check_fuzzer()
2626 mtree_test_insert(mt, 11, (void *)0x17); in check_fuzzer()
2627 mtree_test_insert(mt, 5, (void *)0xb); in check_fuzzer()
2628 mtree_test_insert(mt, 1218, (void *)0x985); in check_fuzzer()
2629 mtree_test_insert(mt, 61, (void *)0x7b); in check_fuzzer()
2630 mtree_test_store(mt, 1, (void *)0x3); in check_fuzzer()
2631 mtree_test_insert(mt, 121, (void *)0xf3); in check_fuzzer()
2632 mtree_test_insert(mt, 8, (void *)0x11); in check_fuzzer()
2633 mtree_test_insert(mt, 21, (void *)0x2b); in check_fuzzer()
2634 mtree_test_insert(mt, 2, (void *)0x5); in check_fuzzer()
2635 mtree_test_insert(mt, ULONG_MAX - 10, (void *)0xffffffffffffffeb); in check_fuzzer()
2636 mtree_test_erase(mt, ULONG_MAX - 10); in check_fuzzer()
2640 static noinline void __init check_dup_gaps(struct maple_tree *mt, in check_dup_gaps() argument
2648 MA_STATE(mas, mt, 0, 0); in check_dup_gaps()
2660 mtree_store_range(mt, i*10, (i+1)*10 - gap, in check_dup_gaps()
2668 MT_BUG_ON(mt, ret != 0); in check_dup_gaps()
2684 static noinline void __init check_dup(struct maple_tree *mt) in check_dup() argument
2691 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_dup()
2692 check_dup_gaps(mt, i, true, 5); in check_dup()
2693 mtree_destroy(mt); in check_dup()
2701 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_dup()
2702 check_dup_gaps(mt, i, true, 0); in check_dup()
2703 mtree_destroy(mt); in check_dup()
2711 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_dup()
2712 check_dup_gaps(mt, i, true, 5); in check_dup()
2713 mtree_destroy(mt); in check_dup()
2721 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_dup()
2722 check_dup_gaps(mt, i, false, 5); in check_dup()
2723 mtree_destroy(mt); in check_dup()
2731 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in check_dup()
2732 check_dup_gaps(mt, i, false, 5); in check_dup()
2733 mtree_destroy(mt); in check_dup()
2741 mt_init_flags(mt, 0); in check_dup()
2742 check_dup_gaps(mt, i, false, 5); in check_dup()
2743 mtree_destroy(mt); in check_dup()
2753 mt_init_flags(mt, 0); in check_dup()
2754 check_dup_gaps(mt, i, true, 5); in check_dup()
2755 mtree_destroy(mt); in check_dup()
2763 mt_init_flags(mt, 0); in check_dup()
2764 check_dup_gaps(mt, i, true, 5); in check_dup()
2765 mtree_destroy(mt); in check_dup()
2772 static noinline void __init check_bnode_min_spanning(struct maple_tree *mt) in check_bnode_min_spanning() argument
2775 MA_STATE(mas, mt, 0, 0); in check_bnode_min_spanning()
2791 static noinline void __init check_empty_area_window(struct maple_tree *mt) in check_empty_area_window() argument
2794 MA_STATE(mas, mt, 0, 0); in check_empty_area_window()
2797 mtree_store_range(mt, i*10, i*10 + 9, in check_empty_area_window()
2801 mtree_store_range(mt, 160, 169, NULL, GFP_KERNEL); in check_empty_area_window()
2805 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 5, 90, 10) != -EBUSY); in check_empty_area_window()
2808 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 6, 90, 5) != -EBUSY); in check_empty_area_window()
2812 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 5, 90, 5) != 0); in check_empty_area_window()
2813 MT_BUG_ON(mt, mas.index != 5); in check_empty_area_window()
2814 MT_BUG_ON(mt, mas.last != 9); in check_empty_area_window()
2820 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 5, 217, 9) != 0); in check_empty_area_window()
2821 MT_BUG_ON(mt, mas.index != 161); in check_empty_area_window()
2822 MT_BUG_ON(mt, mas.last != 169); in check_empty_area_window()
2826 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 100, 218, 3) != 0); in check_empty_area_window()
2827 MT_BUG_ON(mt, mas.index != 216); in check_empty_area_window()
2828 MT_BUG_ON(mt, mas.last != 218); in check_empty_area_window()
2832 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 100, 218, 16) != -EBUSY); in check_empty_area_window()
2839 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 167, 200, 4) != -EBUSY); in check_empty_area_window()
2846 MT_BUG_ON(mt, mas_empty_area_rev(&mas, 100, 162, 4) != -EBUSY); in check_empty_area_window()
2850 MT_BUG_ON(mt, mas_empty_area(&mas, 0, 100, 9) != 0); in check_empty_area_window()
2851 MT_BUG_ON(mt, mas.index != 0); in check_empty_area_window()
2852 MT_BUG_ON(mt, mas.last != 8); in check_empty_area_window()
2855 MT_BUG_ON(mt, mas_empty_area(&mas, 0, 100, 4) != 0); in check_empty_area_window()
2856 MT_BUG_ON(mt, mas.index != 0); in check_empty_area_window()
2857 MT_BUG_ON(mt, mas.last != 3); in check_empty_area_window()
2860 MT_BUG_ON(mt, mas_empty_area(&mas, 0, 100, 11) != -EBUSY); in check_empty_area_window()
2863 MT_BUG_ON(mt, mas_empty_area(&mas, 5, 100, 6) != -EBUSY); in check_empty_area_window()
2866 MT_BUG_ON(mt, mas_empty_area(&mas, 0, 8, 10) != -EINVAL); in check_empty_area_window()
2872 MT_BUG_ON(mt, mas_empty_area(&mas, 100, 163, 6) != -EBUSY); in check_empty_area_window()
2876 static noinline void __init check_empty_area_fill(struct maple_tree *mt) in check_empty_area_fill() argument
2881 MA_STATE(mas, mt, 0, 0); in check_empty_area_fill()
2890 MT_BUG_ON(mt, mas_empty_area(&mas, 0, max, size) != 0); in check_empty_area_fill()
2891 MT_BUG_ON(mt, mas.last != mas.index + size - 1); in check_empty_area_fill()
2901 MT_BUG_ON(mt, mas_empty_area(&mas, 0, max, size) != -EBUSY); in check_empty_area_fill()
2906 mtree_store_range(mt, i, i + 5, (void *)i, GFP_KERNEL); in check_empty_area_fill()
2908 mtree_erase(mt, 631668735); in check_empty_area_fill()
2910 mtree_erase(mt, 629506047); in check_empty_area_fill()
2914 MT_BUG_ON(mt, mas_empty_area(&mas, 629506048, 690000000, 0x5000) != 0); in check_empty_area_fill()
3064 static noinline void __init check_state_handling(struct maple_tree *mt) in check_state_handling() argument
3066 MA_STATE(mas, mt, 0, 0); in check_state_handling()
3072 mtree_store_range(mt, 0, 0, ptr, GFP_KERNEL); in check_state_handling()
3077 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3078 MT_BUG_ON(mt, mas.status != ma_underflow); in check_state_handling()
3083 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3084 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3085 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3086 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3092 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3093 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3094 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3095 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3100 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3101 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3102 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3103 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3108 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3109 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3110 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3111 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3116 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3117 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3118 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3119 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3123 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3124 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3125 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3126 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3130 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3131 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3132 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3133 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3138 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3139 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3140 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3141 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3145 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3146 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3147 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3148 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3153 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3154 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3155 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3156 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3160 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3161 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3162 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3163 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3167 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3168 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3169 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3170 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3175 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3176 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3177 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3178 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3183 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3184 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3185 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3186 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3192 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3193 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3194 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3195 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3200 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3201 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3202 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3203 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3207 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3208 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3209 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3210 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3215 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3216 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3217 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3218 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3224 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3225 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3226 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3227 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3232 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3233 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3234 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3235 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3239 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3240 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3241 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3242 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3247 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3248 MT_BUG_ON(mt, mas.index != 1); in check_state_handling()
3249 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3250 MT_BUG_ON(mt, mas.status != ma_none); in check_state_handling()
3255 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3256 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3257 MT_BUG_ON(mt, mas.last != 0); in check_state_handling()
3258 MT_BUG_ON(mt, mas.status != ma_root); in check_state_handling()
3263 mtree_store_range(mt, 0, 0, NULL, GFP_KERNEL); in check_state_handling()
3264 mtree_store_range(mt, 0x1000, 0x1500, ptr, GFP_KERNEL); in check_state_handling()
3265 mtree_store_range(mt, 0x2000, 0x2500, ptr2, GFP_KERNEL); in check_state_handling()
3266 mtree_store_range(mt, 0x3000, 0x3500, ptr3, GFP_KERNEL); in check_state_handling()
3273 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3274 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3275 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3276 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3282 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3283 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3284 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3285 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3292 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3293 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3294 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3295 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3299 MT_BUG_ON(mt, entry != ptr2); in check_state_handling()
3300 MT_BUG_ON(mt, mas.index != 0x2000); in check_state_handling()
3301 MT_BUG_ON(mt, mas.last != 0x2500); in check_state_handling()
3302 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3306 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3307 MT_BUG_ON(mt, mas.index != 0x2501); in check_state_handling()
3308 MT_BUG_ON(mt, mas.last != 0x2fff); in check_state_handling()
3309 MT_BUG_ON(mt, !mas_is_overflow(&mas)); in check_state_handling()
3313 MT_BUG_ON(mt, entry != ptr3); in check_state_handling()
3314 MT_BUG_ON(mt, mas.index != 0x3000); in check_state_handling()
3315 MT_BUG_ON(mt, mas.last != 0x3500); in check_state_handling()
3316 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3320 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3321 MT_BUG_ON(mt, mas.index != 0x3501); in check_state_handling()
3322 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3323 MT_BUG_ON(mt, !mas_is_overflow(&mas)); in check_state_handling()
3327 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3328 MT_BUG_ON(mt, mas.index != 0x3501); in check_state_handling()
3329 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3330 MT_BUG_ON(mt, !mas_is_overflow(&mas)); in check_state_handling()
3334 MT_BUG_ON(mt, entry != ptr3); in check_state_handling()
3335 MT_BUG_ON(mt, mas.index != 0x3000); in check_state_handling()
3336 MT_BUG_ON(mt, mas.last != 0x3500); in check_state_handling()
3337 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3345 MT_BUG_ON(mt, entry != ptr2); in check_state_handling()
3346 MT_BUG_ON(mt, mas.index != 0x2000); in check_state_handling()
3347 MT_BUG_ON(mt, mas.last != 0x2500); in check_state_handling()
3348 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3352 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3353 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3354 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3355 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3360 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3361 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3362 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3363 MT_BUG_ON(mt, !mas_is_active(&mas)); /* spanning limit */ in check_state_handling()
3365 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3366 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3367 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3368 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3372 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3373 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3374 MT_BUG_ON(mt, mas.last != 0x0FFF); in check_state_handling()
3375 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3379 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3380 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3381 MT_BUG_ON(mt, mas.last != 0x0FFF); in check_state_handling()
3382 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3386 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3387 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3388 MT_BUG_ON(mt, mas.last != 0x0FFF); in check_state_handling()
3389 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3393 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3394 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3395 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3396 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3400 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3401 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3402 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3403 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3407 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3408 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3409 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3410 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3415 MT_BUG_ON(mt, entry != ptr3); in check_state_handling()
3418 MT_BUG_ON(mt, entry != ptr2); in check_state_handling()
3419 MT_BUG_ON(mt, mas.index != 0x2000); in check_state_handling()
3420 MT_BUG_ON(mt, mas.last != 0x2500); in check_state_handling()
3421 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3425 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3426 MT_BUG_ON(mt, mas.index != 0x1501); in check_state_handling()
3427 MT_BUG_ON(mt, mas.last != 0x1FFF); in check_state_handling()
3428 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3432 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3433 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3434 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3435 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3440 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3441 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3442 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3443 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3449 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3450 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3451 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3452 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3457 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3458 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3459 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3460 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3464 MT_BUG_ON(mt, entry != ptr2); in check_state_handling()
3465 MT_BUG_ON(mt, mas.index != 0x2000); in check_state_handling()
3466 MT_BUG_ON(mt, mas.last != 0x2500); in check_state_handling()
3467 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3472 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3473 MT_BUG_ON(mt, mas.index != 0x2501); in check_state_handling()
3474 MT_BUG_ON(mt, mas.last != 0x2FFF); in check_state_handling()
3479 MT_BUG_ON(mt, entry != ptr3); in check_state_handling()
3480 MT_BUG_ON(mt, mas.index != 0x3000); in check_state_handling()
3481 MT_BUG_ON(mt, mas.last != 0x3500); in check_state_handling()
3482 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3486 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3487 MT_BUG_ON(mt, mas.index != 0x3501); in check_state_handling()
3488 MT_BUG_ON(mt, mas.last != ULONG_MAX); in check_state_handling()
3493 MT_BUG_ON(mt, entry != ptr3); in check_state_handling()
3494 MT_BUG_ON(mt, mas.index != 0x3000); in check_state_handling()
3495 MT_BUG_ON(mt, mas.last != 0x3500); in check_state_handling()
3496 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3500 MT_BUG_ON(mt, entry != ptr2); in check_state_handling()
3501 MT_BUG_ON(mt, mas.index != 0x2000); in check_state_handling()
3502 MT_BUG_ON(mt, mas.last != 0x2500); in check_state_handling()
3503 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3508 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3509 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3510 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3511 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3515 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3516 MT_BUG_ON(mt, mas.index != 0); in check_state_handling()
3517 MT_BUG_ON(mt, mas.last != 0x0FFF); in check_state_handling()
3518 MT_BUG_ON(mt, !mas_is_underflow(&mas)); in check_state_handling()
3523 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3524 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3525 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3526 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3531 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3532 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3533 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3534 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3539 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3540 MT_BUG_ON(mt, mas.index != 0x1501); in check_state_handling()
3541 MT_BUG_ON(mt, mas.last != 0x1fff); in check_state_handling()
3542 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3548 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3549 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3550 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3551 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3557 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3558 MT_BUG_ON(mt, mas.index != 0x1501); in check_state_handling()
3559 MT_BUG_ON(mt, mas.last != 0x1fff); in check_state_handling()
3560 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3566 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3567 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3568 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3569 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3575 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3576 MT_BUG_ON(mt, mas.index != 0x1501); in check_state_handling()
3577 MT_BUG_ON(mt, mas.last != 0x1fff); in check_state_handling()
3578 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3585 MT_BUG_ON(mt, entry != ptr); in check_state_handling()
3586 MT_BUG_ON(mt, mas.index != 0x1000); in check_state_handling()
3587 MT_BUG_ON(mt, mas.last != 0x1500); in check_state_handling()
3588 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3594 MT_BUG_ON(mt, entry != NULL); in check_state_handling()
3595 MT_BUG_ON(mt, mas.index != 0x1501); in check_state_handling()
3596 MT_BUG_ON(mt, mas.last != 0x1fff); in check_state_handling()
3597 MT_BUG_ON(mt, !mas_is_active(&mas)); in check_state_handling()
3602 static noinline void __init alloc_cyclic_testing(struct maple_tree *mt) in alloc_cyclic_testing() argument
3607 MA_STATE(mas, mt, 0, 0); in alloc_cyclic_testing()
3610 mtree_lock(mt); in alloc_cyclic_testing()
3612 mas_alloc_cyclic(&mas, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL); in alloc_cyclic_testing()
3619 mtree_unlock(mt); in alloc_cyclic_testing()
3620 mtree_destroy(mt); in alloc_cyclic_testing()
3622 mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); in alloc_cyclic_testing()
3624 mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL); in alloc_cyclic_testing()
3625 MT_BUG_ON(mt, i != location - 2); in alloc_cyclic_testing()
3626 MT_BUG_ON(mt, i != next - 3); in alloc_cyclic_testing()
3627 MT_BUG_ON(mt, mtree_load(mt, location) != mt); in alloc_cyclic_testing()
3630 mtree_destroy(mt); in alloc_cyclic_testing()
3633 ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL); in alloc_cyclic_testing()
3634 MT_BUG_ON(mt, ret != 0); in alloc_cyclic_testing()
3635 ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL); in alloc_cyclic_testing()
3636 MT_BUG_ON(mt, ret != 0); in alloc_cyclic_testing()
3637 ret = mtree_alloc_cyclic(mt, &location, mt, 2, ULONG_MAX, &next, GFP_KERNEL); in alloc_cyclic_testing()
3638 MT_BUG_ON(mt, ret != 1); in alloc_cyclic_testing()