Lines Matching full:ps
26 u32 mm_size, size, ps, bias_size, bias_start, bias_end, bias_rem; in drm_test_buddy_alloc_range_bias() local
35 ps = roundup_pow_of_two(prandom_u32_state(&prng) % bias_size); in drm_test_buddy_alloc_range_bias()
36 ps = max(SZ_4K, ps); in drm_test_buddy_alloc_range_bias()
37 mm_size = (SZ_8M-1) & ~(ps-1); /* Multiple roots */ in drm_test_buddy_alloc_range_bias()
39 kunit_info(test, "mm_size=%u, ps=%u\n", mm_size, ps); in drm_test_buddy_alloc_range_bias()
41 KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_init(&mm, mm_size, ps), in drm_test_buddy_alloc_range_bias()
66 bias_end, bias_size + ps, bias_size, in drm_test_buddy_alloc_range_bias()
69 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
75 bias_end, bias_size + ps, ps, in drm_test_buddy_alloc_range_bias()
78 "buddy_alloc didn't fail with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
79 bias_start, bias_end, bias_size + ps, ps); in drm_test_buddy_alloc_range_bias()
83 drm_buddy_alloc_blocks(&mm, bias_start + ps, in drm_test_buddy_alloc_range_bias()
84 bias_end, bias_size, ps, in drm_test_buddy_alloc_range_bias()
87 "buddy_alloc didn't fail with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
88 bias_start + ps, bias_end, bias_size, ps); in drm_test_buddy_alloc_range_bias()
92 drm_buddy_alloc_blocks(&mm, bias_start + ps, in drm_test_buddy_alloc_range_bias()
93 bias_end - ps, in drm_test_buddy_alloc_range_bias()
97 "buddy_alloc h didn't fail with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
98 bias_start + ps, bias_end - ps, bias_size >> 1, bias_size >> 1); in drm_test_buddy_alloc_range_bias()
106 "buddy_alloc i failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
113 bias_end, ps, bias_size, in drm_test_buddy_alloc_range_bias()
116 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
117 bias_start, bias_end, ps, bias_size); in drm_test_buddy_alloc_range_bias()
121 size = max(round_up(prandom_u32_state(&prng) % bias_rem, ps), ps); in drm_test_buddy_alloc_range_bias()
125 bias_end, size, ps, in drm_test_buddy_alloc_range_bias()
128 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
129 bias_start, bias_end, size, ps); in drm_test_buddy_alloc_range_bias()
135 bias_end, bias_rem + ps, ps, in drm_test_buddy_alloc_range_bias()
138 "buddy_alloc didn't fail with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
139 bias_start, bias_end, bias_rem + ps, ps); in drm_test_buddy_alloc_range_bias()
143 size = max(round_up(prandom_u32_state(&prng) % bias_rem, ps), ps); in drm_test_buddy_alloc_range_bias()
144 size = max(size, ps); in drm_test_buddy_alloc_range_bias()
148 bias_end, size, ps, in drm_test_buddy_alloc_range_bias()
151 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
152 bias_start, bias_end, size, ps); in drm_test_buddy_alloc_range_bias()
177 KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_init(&mm, mm_size, ps), in drm_test_buddy_alloc_range_bias()
180 bias_start = round_up(prandom_u32_state(&prng) % (mm_size - ps), ps); in drm_test_buddy_alloc_range_bias()
181 bias_end = round_up(bias_start + prandom_u32_state(&prng) % (mm_size - bias_start), ps); in drm_test_buddy_alloc_range_bias()
182 bias_end = max(bias_end, bias_start + ps); in drm_test_buddy_alloc_range_bias()
186 u32 size = max(round_up(prandom_u32_state(&prng) % bias_rem, ps), ps); in drm_test_buddy_alloc_range_bias()
190 bias_end, size, ps, in drm_test_buddy_alloc_range_bias()
193 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
194 bias_start, bias_end, size, ps); in drm_test_buddy_alloc_range_bias()
206 bias_start -= round_up(prandom_u32_state(&prng) % bias_start, ps); in drm_test_buddy_alloc_range_bias()
208 bias_end += round_up(prandom_u32_state(&prng) % (mm_size - bias_end), ps); in drm_test_buddy_alloc_range_bias()
219 ps, ps, in drm_test_buddy_alloc_range_bias()
223 bias_start, bias_end, ps); in drm_test_buddy_alloc_range_bias()
235 KUNIT_ASSERT_FALSE_MSG(test, drm_buddy_init(&mm, mm_size, ps), in drm_test_buddy_alloc_range_bias()
238 bias_start = round_up(prandom_u32_state(&prng) % (mm_size - ps), ps); in drm_test_buddy_alloc_range_bias()
239 bias_end = round_up(bias_start + prandom_u32_state(&prng) % (mm_size - bias_start), ps); in drm_test_buddy_alloc_range_bias()
240 bias_end = max(bias_end, bias_start + ps); in drm_test_buddy_alloc_range_bias()
244 size = max(round_up(prandom_u32_state(&prng) % bias_rem, ps), ps); in drm_test_buddy_alloc_range_bias()
248 bias_end, size, ps, in drm_test_buddy_alloc_range_bias()
251 "buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", in drm_test_buddy_alloc_range_bias()
252 bias_start, bias_end, size, ps); in drm_test_buddy_alloc_range_bias()
265 const unsigned long ps = SZ_4K; in drm_test_buddy_alloc_clear() local
276 KUNIT_EXPECT_FALSE(test, drm_buddy_init(&mm, mm_size, ps)); in drm_test_buddy_alloc_clear()
290 5 * ps, ps, &allocated, in drm_test_buddy_alloc_clear()
292 "buddy_alloc hit an error size=%lu\n", 5 * ps); in drm_test_buddy_alloc_clear()
310 ps, ps, list, in drm_test_buddy_alloc_clear()
312 "buddy_alloc hit an error size=%lu\n", ps); in drm_test_buddy_alloc_clear()
328 10 * ps, ps, &clean, in drm_test_buddy_alloc_clear()
330 "buddy_alloc hit an error size=%lu\n", 10 * ps); in drm_test_buddy_alloc_clear()
336 KUNIT_EXPECT_FALSE(test, drm_buddy_init(&mm, mm_size, ps)); in drm_test_buddy_alloc_clear()
348 n_pages = mm_size / ps; in drm_test_buddy_alloc_clear()
359 ps, ps, list, 0), in drm_test_buddy_alloc_clear()
360 "buddy_alloc hit an error size=%lu\n", ps); in drm_test_buddy_alloc_clear()
393 size = max(round_up(prandom_u32_state(&prng) % mm_size, ps), ps); in drm_test_buddy_alloc_clear()
394 KUNIT_EXPECT_FALSE(test, drm_buddy_init(&mm, mm_size, ps)); in drm_test_buddy_alloc_clear()
396 size, ps, &allocated, in drm_test_buddy_alloc_clear()
405 const unsigned long ps = SZ_4K, mm_size = 16 * 3 * SZ_4K; in drm_test_buddy_alloc_contiguous() local
414 KUNIT_EXPECT_FALSE(test, drm_buddy_init(&mm, mm_size, ps)); in drm_test_buddy_alloc_contiguous()
425 n_pages = mm_size / ps; in drm_test_buddy_alloc_contiguous()
438 ps, ps, list, 0), in drm_test_buddy_alloc_contiguous()
440 ps); in drm_test_buddy_alloc_contiguous()
444 3 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
446 "buddy_alloc didn't error size=%lu\n", 3 * ps); in drm_test_buddy_alloc_contiguous()
450 3 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
452 "buddy_alloc didn't error size=%lu\n", 3 * ps); in drm_test_buddy_alloc_contiguous()
454 2 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
456 "buddy_alloc didn't error size=%lu\n", 2 * ps); in drm_test_buddy_alloc_contiguous()
460 3 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
462 "buddy_alloc didn't error size=%lu\n", 3 * ps); in drm_test_buddy_alloc_contiguous()
469 2 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
471 "buddy_alloc hit an error size=%lu\n", 2 * ps); in drm_test_buddy_alloc_contiguous()
475 3 * ps, ps, &allocated, in drm_test_buddy_alloc_contiguous()
477 "buddy_alloc hit an error size=%lu\n", 3 * ps); in drm_test_buddy_alloc_contiguous()
483 KUNIT_ASSERT_EQ(test, total, ps * 2 + ps * 3); in drm_test_buddy_alloc_contiguous()