Lines Matching refs:depth

560 	int i, depth = READ_ONCE(p->lockdep_depth);  in lockdep_print_held_locks()  local
562 if (!depth) in lockdep_print_held_locks()
565 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
566 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
573 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
976 int depth = 0; in get_lock_depth() local
981 depth++; in get_lock_depth()
983 return depth; in get_lock_depth()
1084 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1088 printk("\n-> #%u", depth); in print_circular_bug_entry()
1151 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1175 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
1194 int depth; in print_circular_bug() local
1202 depth = get_lock_depth(target); in print_circular_bug()
1204 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
1210 print_circular_bug_entry(parent, --depth); in print_circular_bug()
1388 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
1392 printk("%*s->", depth, ""); in print_lock_class_header()
1399 int len = depth; in print_lock_class_header()
1401 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
1406 printk("%*s }\n", depth, ""); in print_lock_class_header()
1409 depth, "", class->key, class->key); in print_lock_class_header()
1420 int depth; in print_shortest_lock_dependencies() local
1423 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
1426 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
1427 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
1431 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
1437 depth--; in print_shortest_lock_dependencies()
1438 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
1941 int depth = curr->lockdep_depth; in check_prevs_add() local
1955 if (!depth) in check_prevs_add()
1961 if (curr->held_locks[depth].irq_context != in check_prevs_add()
1962 curr->held_locks[depth-1].irq_context) in check_prevs_add()
1966 int distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
1967 hlock = curr->held_locks + depth - 1; in check_prevs_add()
1988 depth--; in check_prevs_add()
1992 if (!depth) in check_prevs_add()
1997 if (curr->held_locks[depth].irq_context != in check_prevs_add()
1998 curr->held_locks[depth-1].irq_context) in check_prevs_add()
2064 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
2067 printk("depth: %u\n", depth + 1); in print_chain_keys_held_locks()
2068 for (i = get_first_held_lock(curr, hlock_next); i < depth; i++) { in print_chain_keys_held_locks()
2085 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
2086 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
2133 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
2138 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
2192 chain->depth = 2; in add_chain_cache_classes()
2193 if (likely(nr_chain_hlocks + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) { in add_chain_cache_classes()
2195 nr_chain_hlocks += chain->depth; in add_chain_cache_classes()
2261 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
2267 if (likely(nr_chain_hlocks + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) { in add_chain_cache()
2269 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
2277 nr_chain_hlocks += chain->depth; in add_chain_cache()
2573 int depth; in print_irq_inversion_bug() local
2596 depth = get_lock_depth(other); in print_irq_inversion_bug()
2598 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
2604 depth--; in print_irq_inversion_bug()
2605 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
3040 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
3045 if (depth) { in separate_irq_context()
3048 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
3274 unsigned int depth; in __lock_acquire() local
3317 depth = curr->lockdep_depth; in __lock_acquire()
3321 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
3326 if (depth) { in __lock_acquire()
3327 hlock = curr->held_locks + depth - 1; in __lock_acquire()
3345 hlock = curr->held_locks + depth; in __lock_acquire()
3392 if (!depth) { in __lock_acquire()
3508 unsigned int depth, int *idx) in find_held_lock() argument
3513 i = depth - 1; in find_held_lock()
3541 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
3546 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
3567 unsigned int depth; in __lock_set_class() local
3570 depth = curr->lockdep_depth; in __lock_set_class()
3575 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
3578 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
3589 if (reacquire_held_locks(curr, depth, i)) in __lock_set_class()
3596 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_set_class()
3605 unsigned int depth; in __lock_downgrade() local
3608 depth = curr->lockdep_depth; in __lock_downgrade()
3613 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
3616 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
3627 if (reacquire_held_locks(curr, depth, i)) in __lock_downgrade()
3634 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
3651 unsigned int depth; in __lock_release() local
3657 depth = curr->lockdep_depth; in __lock_release()
3662 if (DEBUG_LOCKS_WARN_ON(depth <= 0)) in __lock_release()
3669 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
3699 if (reacquire_held_locks(curr, depth, i + 1)) in __lock_release()
3706 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - 1)) in __lock_release()
4036 unsigned int depth; in __lock_contended() local
4039 depth = curr->lockdep_depth; in __lock_contended()
4044 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
4047 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
4077 unsigned int depth; in __lock_acquired() local
4081 depth = curr->lockdep_depth; in __lock_acquired()
4086 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
4089 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()