Lines Matching refs:depth
752 int i, depth = READ_ONCE(p->lockdep_depth); in lockdep_print_held_locks() local
754 if (!depth) in lockdep_print_held_locks()
757 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
758 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
765 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
1020 for (i = chain->base; i < chain->base + chain->depth; i++) in check_lock_chain_key()
1506 int depth = 0; in get_lock_depth() local
1511 depth++; in get_lock_depth()
1513 return depth; in get_lock_depth()
1831 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1835 printk("\n-> #%u", depth); in print_circular_bug_entry()
1896 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1920 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
1993 int depth; in print_circular_bug() local
2002 depth = get_lock_depth(target); in print_circular_bug()
2004 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
2010 print_circular_bug_entry(parent, --depth); in print_circular_bug()
2294 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
2298 printk("%*s->", depth, ""); in print_lock_class_header()
2307 int len = depth; in print_lock_class_header()
2309 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
2314 printk("%*s }\n", depth, ""); in print_lock_class_header()
2317 depth, "", class->key, class->key); in print_lock_class_header()
2377 int depth; in print_shortest_lock_dependencies() local
2380 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
2383 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
2384 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
2388 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
2394 depth--; in print_shortest_lock_dependencies()
2395 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
2424 int depth; in print_shortest_lock_dependencies_backwards() local
2427 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies_backwards()
2430 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies_backwards()
2432 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies_backwards()
2443 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies_backwards()
2449 depth--; in print_shortest_lock_dependencies_backwards()
2450 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies_backwards()
3163 int depth = curr->lockdep_depth; in check_prevs_add() local
3171 if (!depth) in check_prevs_add()
3177 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3178 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3182 u16 distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
3183 hlock = curr->held_locks + depth - 1; in check_prevs_add()
3200 depth--; in check_prevs_add()
3204 if (!depth) in check_prevs_add()
3209 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3210 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3506 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
3509 printk("depth: %u (irq_context %u)\n", depth - i + 1, in print_chain_keys_held_locks()
3511 for (; i < depth; i++) { in print_chain_keys_held_locks()
3528 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
3529 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
3576 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
3581 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
3655 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
3661 j = alloc_chain_hlocks(chain->depth); in add_chain_cache()
3672 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
3963 int depth; in print_irq_inversion_bug() local
3986 depth = get_lock_depth(other); in print_irq_inversion_bug()
3988 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
3994 depth--; in print_irq_inversion_bug()
3995 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
4541 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
4546 if (depth) { in separate_irq_context()
4549 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
4703 int depth; in check_wait_context() local
4714 for (depth = curr->lockdep_depth - 1; depth >= 0; depth--) { in check_wait_context()
4715 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4719 depth++; in check_wait_context()
4723 for (; depth < curr->lockdep_depth; depth++) { in check_wait_context()
4724 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4889 unsigned int depth; in __lock_acquire() local
4926 depth = curr->lockdep_depth; in __lock_acquire()
4930 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
4935 if (depth) { /* we're holding locks */ in __lock_acquire()
4936 hlock = curr->held_locks + depth - 1; in __lock_acquire()
4954 hlock = curr->held_locks + depth; in __lock_acquire()
5001 if (!depth) { in __lock_acquire()
5023 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
5122 unsigned int depth, int *idx) in find_held_lock() argument
5127 i = depth - 1; in find_held_lock()
5155 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
5164 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
5193 unsigned int depth, merged = 0; in __lock_set_class() local
5201 depth = curr->lockdep_depth; in __lock_set_class()
5206 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
5209 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
5224 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_set_class()
5231 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)) in __lock_set_class()
5239 unsigned int depth, merged = 0; in __lock_downgrade() local
5246 depth = curr->lockdep_depth; in __lock_downgrade()
5251 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
5254 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
5267 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_downgrade()
5278 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
5293 unsigned int depth, merged = 1; in __lock_release() local
5300 depth = curr->lockdep_depth; in __lock_release()
5305 if (depth <= 0) { in __lock_release()
5314 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
5350 if (i == depth-1) in __lock_release()
5353 if (reacquire_held_locks(curr, depth, i + 1, &merged)) in __lock_release()
5361 DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged); in __lock_release()
5777 unsigned int depth; in __lock_contended() local
5780 depth = curr->lockdep_depth; in __lock_contended()
5785 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
5788 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
5818 unsigned int depth; in __lock_acquired() local
5822 depth = curr->lockdep_depth; in __lock_acquired()
5827 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
5830 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()
5927 for (i = chain->base; i < chain->base + chain->depth; i++) { in remove_class_from_lock_chain()
5940 free_chain_hlocks(chain->base, chain->depth); in remove_class_from_lock_chain()