Lines Matching +full:phase +full:- +full:shift
41 for (d = 0; d < depth - 1; d++) { in __sync_print()
42 if (last & BIT(depth - d - 1)) in __sync_print()
47 *sz -= len; in __sync_print()
49 len = scnprintf(buf, *sz, "%x-> ", idx); in __sync_print()
51 *sz -= len; in __sync_print()
55 len = scnprintf(buf, *sz, "0x%016llx", p->prefix << p->height << SHIFT); in __sync_print()
57 *sz -= len; in __sync_print()
58 X = (p->height + SHIFT) / 4; in __sync_print()
59 scnprintf(buf - X, *sz + X, "%*s", X, "XXXXXXXXXXXXXXXXX"); in __sync_print()
61 if (!p->height) { in __sync_print()
62 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print()
66 *sz -= len; in __sync_print()
68 buf -= 1; in __sync_print()
74 *sz -= len; in __sync_print()
76 if (p->height) { in __sync_print()
77 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print()
80 last << 1 | ((p->bitmap >> (i + 1)) ? 1 : 0), in __sync_print()
94 while (p->parent) in i915_syncmap_print_to_buf()
95 p = p->parent; in i915_syncmap_print_to_buf()
106 return -EINVAL; in check_syncmap_free()
148 if (leaf->height) { in check_seqno()
150 __func__, leaf->height); in check_seqno()
151 return -EINVAL; in check_seqno()
157 return -EINVAL; in check_seqno()
171 if ((*sync)->height) { in check_one()
173 context, (*sync)->height, (*sync)->prefix); in check_one()
174 return -EINVAL; in check_one()
177 if ((*sync)->parent) { in check_one()
180 return -EINVAL; in check_one()
183 if (hweight32((*sync)->bitmap) != 1) { in check_one()
185 (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_one()
186 return -EINVAL; in check_one()
189 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_one()
196 return -EINVAL; in check_one()
233 __func__, max * (max - 1) / 2); in igt_syncmap_one()
246 if ((*sync)->height) { in check_leaf()
248 context, (*sync)->height, (*sync)->prefix); in check_leaf()
249 return -EINVAL; in check_leaf()
252 if (hweight32((*sync)->bitmap) != 1) { in check_leaf()
254 context, (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_leaf()
255 return -EINVAL; in check_leaf()
258 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_leaf()
265 return -EINVAL; in check_leaf()
296 for (order = 0; order < 64; order += SHIFT) { in igt_syncmap_join_above()
304 join = sync->parent; in igt_syncmap_join_above()
308 if (!join->height) { in igt_syncmap_join_above()
310 err = -EINVAL; in igt_syncmap_join_above()
314 if (hweight32(join->bitmap) != 2) { in igt_syncmap_join_above()
316 join->bitmap, hweight32(join->bitmap)); in igt_syncmap_join_above()
317 err = -EINVAL; in igt_syncmap_join_above()
323 err = -EINVAL; in igt_syncmap_join_above()
336 int err = -ENODEV; in igt_syncmap_join_below()
345 for (order = 64 - SHIFT; order > 0; order -= SHIFT) { in igt_syncmap_join_below()
352 if (sync->height) { in igt_syncmap_join_below()
354 context, order, step, sync->height, sync->prefix); in igt_syncmap_join_below()
355 err = -EINVAL; in igt_syncmap_join_below()
362 for (order = SHIFT; order < 64; order += SHIFT) { in igt_syncmap_join_below()
368 err = -EINVAL; in igt_syncmap_join_below()
376 err = -EINVAL; in igt_syncmap_join_below()
383 for (order = SHIFT; order < 64; order += SHIFT) { in igt_syncmap_join_below()
390 err = -EINVAL; in igt_syncmap_join_below()
405 int err = -ENODEV; in igt_syncmap_neighbours()
425 if (sync->height) { in igt_syncmap_neighbours()
427 context, sync->height, sync->prefix); in igt_syncmap_neighbours()
428 err = -EINVAL; in igt_syncmap_neighbours()
432 if (sync->bitmap != BIT(idx + 1) - 1) { in igt_syncmap_neighbours()
435 sync->bitmap, hweight32(sync->bitmap), in igt_syncmap_neighbours()
436 BIT(idx + 1) - 1, idx + 1); in igt_syncmap_neighbours()
437 err = -EINVAL; in igt_syncmap_neighbours()
450 int err = -ENODEV; in igt_syncmap_compact()
455 * The syncmap are "space efficient" compressed radix trees - any in igt_syncmap_compact()
458 * If we construct a tree with ids that are neighbouring at a non-zero in igt_syncmap_compact()
462 for (order = SHIFT; order < 64; order += SHIFT) { in igt_syncmap_compact()
475 if (sync->height) { in igt_syncmap_compact()
478 sync->height, sync->prefix); in igt_syncmap_compact()
479 err = -EINVAL; in igt_syncmap_compact()
484 sync = sync->parent; in igt_syncmap_compact()
485 if (sync->parent) { in igt_syncmap_compact()
487 err = -EINVAL; in igt_syncmap_compact()
491 if (sync->height != order) { in igt_syncmap_compact()
493 sync->height, order); in igt_syncmap_compact()
494 err = -EINVAL; in igt_syncmap_compact()
498 if (sync->bitmap != BIT(KSYNCMAP) - 1) { in igt_syncmap_compact()
500 sync->bitmap, hweight32(sync->bitmap), in igt_syncmap_compact()
501 BIT(KSYNCMAP) - 1, KSYNCMAP); in igt_syncmap_compact()
502 err = -EINVAL; in igt_syncmap_compact()
510 if (leaf->height) { in igt_syncmap_compact()
512 err = -EINVAL; in igt_syncmap_compact()
516 if (leaf->parent != sync) { in igt_syncmap_compact()
519 err = -EINVAL; in igt_syncmap_compact()
523 if (!is_power_of_2(leaf->bitmap)) { in igt_syncmap_compact()
525 idx, leaf->bitmap, hweight32(leaf->bitmap)); in igt_syncmap_compact()
526 err = -EINVAL; in igt_syncmap_compact()
530 if (leaf->bitmap != BIT(idx)) { in igt_syncmap_compact()
532 idx, ilog2(leaf->bitmap), idx); in igt_syncmap_compact()
533 err = -EINVAL; in igt_syncmap_compact()
547 unsigned long count, phase, i; in igt_syncmap_random() local
560 phase = jiffies + HZ/100 + 1; in igt_syncmap_random()
569 } while (!time_after(jiffies, phase)); in igt_syncmap_random()
572 phase = 0; in igt_syncmap_random()
587 err = -EINVAL; in igt_syncmap_random()
596 phase++; in igt_syncmap_random()
598 pr_debug("Completed %lu passes, each of %lu contexts\n", phase, count); in igt_syncmap_random()