Lines Matching refs:bitmap

29 static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata;
36 static int __init test_find_first_bit(void *bitmap, unsigned long len) in test_find_first_bit() argument
43 i = find_first_bit(bitmap, len); in test_find_first_bit()
44 __clear_bit(i, bitmap); in test_find_first_bit()
52 static int __init test_find_first_and_bit(void *bitmap, const void *bitmap2, unsigned long len) in test_find_first_and_bit() argument
58 bitmap_copy(cp, bitmap, BITMAP_LEN); in test_find_first_and_bit()
71 static int __init test_find_next_bit(const void *bitmap, unsigned long len) in test_find_next_bit() argument
78 i = find_next_bit(bitmap, BITMAP_LEN, i) + 1; in test_find_next_bit()
85 static int __init test_find_next_zero_bit(const void *bitmap, unsigned long len) in test_find_next_zero_bit() argument
92 i = find_next_zero_bit(bitmap, len, i) + 1; in test_find_next_zero_bit()
99 static int __init test_find_last_bit(const void *bitmap, unsigned long len) in test_find_last_bit() argument
107 l = find_last_bit(bitmap, len); in test_find_last_bit()
118 static int __init test_find_nth_bit(const unsigned long *bitmap, unsigned long len) in test_find_nth_bit() argument
120 unsigned long l, n, w = bitmap_weight(bitmap, len); in test_find_nth_bit()
125 l = find_nth_bit(bitmap, len, n); in test_find_nth_bit()
134 static int __init test_find_next_and_bit(const void *bitmap, in test_find_next_and_bit() argument
142 i = find_next_and_bit(bitmap, bitmap2, BITMAP_LEN, i + 1); in test_find_next_and_bit()
155 get_random_bytes(bitmap, sizeof(bitmap)); in find_bit_test()
158 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test()
159 test_find_next_zero_bit(bitmap, BITMAP_LEN); in find_bit_test()
160 test_find_last_bit(bitmap, BITMAP_LEN); in find_bit_test()
161 test_find_nth_bit(bitmap, BITMAP_LEN / 10); in find_bit_test()
167 test_find_first_bit(bitmap, BITMAP_LEN / 10); in find_bit_test()
168 test_find_first_and_bit(bitmap, bitmap2, BITMAP_LEN / 2); in find_bit_test()
169 test_find_next_and_bit(bitmap, bitmap2, BITMAP_LEN); in find_bit_test()
173 bitmap_zero(bitmap, BITMAP_LEN); in find_bit_test()
177 __set_bit(prandom_u32_max(BITMAP_LEN), bitmap); in find_bit_test()
181 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test()
182 test_find_next_zero_bit(bitmap, BITMAP_LEN); in find_bit_test()
183 test_find_last_bit(bitmap, BITMAP_LEN); in find_bit_test()
184 test_find_nth_bit(bitmap, BITMAP_LEN); in find_bit_test()
185 test_find_first_bit(bitmap, BITMAP_LEN); in find_bit_test()
186 test_find_first_and_bit(bitmap, bitmap2, BITMAP_LEN); in find_bit_test()
187 test_find_next_and_bit(bitmap, bitmap2, BITMAP_LEN); in find_bit_test()