Lines Matching refs:base

208 		unsigned long base = round_down(index, 1UL << order);
209 unsigned long next = base + (1UL << order);
219 for (i = base; i < next; i++) {
822 unsigned long index, base, next_index, next_next_index;
826 base = round_down(index, nrpages);
827 next_index = round_down(base + nrpages, nrpages);
830 check_xa_multi_store_adv_add(xa, base, order, &some_val);
833 XA_BUG_ON(xa, test_get_entry(xa, base + i) != &some_val);
851 check_xa_multi_store_adv_delete(xa, base, order);
858 /* hole at base and next_next */
862 XA_BUG_ON(xa, test_get_entry(xa, base + i) != NULL);
873 /* hole at base and next */
878 XA_BUG_ON(xa, test_get_entry(xa, base + i) != NULL);
910 static noinline void check_xa_alloc_1(struct xarray *xa, unsigned int base)
916 /* An empty array should assign %base to the first alloc */
917 xa_alloc_index(xa, base, GFP_KERNEL);
920 xa_erase_index(xa, base);
923 /* And it should assign %base again */
924 xa_alloc_index(xa, base, GFP_KERNEL);
926 /* Allocating and then erasing a lot should not lose base */
927 for (i = base + 1; i < 2 * XA_CHUNK_SIZE; i++)
929 for (i = base; i < 2 * XA_CHUNK_SIZE; i++)
931 xa_alloc_index(xa, base, GFP_KERNEL);
936 /* And it should assign %base again */
937 xa_alloc_index(xa, base, GFP_KERNEL);
939 /* The next assigned ID should be base+1 */
940 xa_alloc_index(xa, base + 1, GFP_KERNEL);
941 xa_erase_index(xa, base + 1);
944 xa_store_index(xa, base + 1, GFP_KERNEL);
945 xa_alloc_index(xa, base + 2, GFP_KERNEL);
947 /* If we then erase base, it should be free */
948 xa_erase_index(xa, base);
949 xa_alloc_index(xa, base, GFP_KERNEL);
951 xa_erase_index(xa, base + 1);
952 xa_erase_index(xa, base + 2);
955 xa_alloc_index(xa, base + i, GFP_KERNEL);
985 static noinline void check_xa_alloc_2(struct xarray *xa, unsigned int base)
994 XA_BUG_ON(xa, id != base);
1002 XA_BUG_ON(xa, id != base);
1007 for (i = base; i < base + 10; i++) {
1024 for (i = base; i < base + 9; i++) {
1030 XA_BUG_ON(xa, xa_erase(xa, base + 9) != NULL);
1036 static noinline void check_xa_alloc_3(struct xarray *xa, unsigned int base)
1067 if (base != 0)
1068 xa_erase_index(xa, base);
1069 xa_erase_index(xa, base + 1);
1074 XA_BUG_ON(xa, xa_alloc_cyclic(xa, &id, xa_mk_index(base),
1076 XA_BUG_ON(xa, id != base);
1077 XA_BUG_ON(xa, xa_alloc_cyclic(xa, &id, xa_mk_index(base + 1),
1079 XA_BUG_ON(xa, id != base + 1);
1671 unsigned long base = xas.xa_index;
1681 void *old = xas_store(&xas, xa_mk_index(base + i));
1683 XA_BUG_ON(xa, old != xa_mk_index(base + i));
1694 for (i = base; i < base + (1UL << order); i++)