Lines Matching refs:depth
781 int i, depth = READ_ONCE(p->lockdep_depth); in lockdep_print_held_locks() local
783 if (!depth) in lockdep_print_held_locks()
786 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
787 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
794 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
1043 for (i = chain->base; i < chain->base + chain->depth; i++) in check_lock_chain_key()
1533 int depth = 0; in get_lock_depth() local
1538 depth++; in get_lock_depth()
1540 return depth; in get_lock_depth()
1858 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1862 printk("\n-> #%u", depth); in print_circular_bug_entry()
1923 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1947 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
2020 int depth; in print_circular_bug() local
2029 depth = get_lock_depth(target); in print_circular_bug()
2031 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
2037 print_circular_bug_entry(parent, --depth); in print_circular_bug()
2321 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
2325 printk("%*s->", depth, ""); in print_lock_class_header()
2334 int len = depth; in print_lock_class_header()
2336 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
2341 printk("%*s }\n", depth, ""); in print_lock_class_header()
2344 depth, "", class->key, class->key); in print_lock_class_header()
2404 int depth; in print_shortest_lock_dependencies() local
2407 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
2410 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
2411 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
2415 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
2421 depth--; in print_shortest_lock_dependencies()
2422 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
2451 int depth; in print_shortest_lock_dependencies_backwards() local
2454 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies_backwards()
2457 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies_backwards()
2459 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies_backwards()
2470 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies_backwards()
2476 depth--; in print_shortest_lock_dependencies_backwards()
2477 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies_backwards()
3186 int depth = curr->lockdep_depth; in check_prevs_add() local
3194 if (!depth) in check_prevs_add()
3200 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3201 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3205 u16 distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
3206 hlock = curr->held_locks + depth - 1; in check_prevs_add()
3223 depth--; in check_prevs_add()
3227 if (!depth) in check_prevs_add()
3232 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3233 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3530 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
3533 printk("depth: %u (irq_context %u)\n", depth - i + 1, in print_chain_keys_held_locks()
3535 for (; i < depth; i++) { in print_chain_keys_held_locks()
3552 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
3553 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
3600 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
3605 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
3679 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
3685 j = alloc_chain_hlocks(chain->depth); in add_chain_cache()
3696 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
3987 int depth; in print_irq_inversion_bug() local
4010 depth = get_lock_depth(other); in print_irq_inversion_bug()
4012 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
4018 depth--; in print_irq_inversion_bug()
4019 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
4564 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
4569 if (depth) { in separate_irq_context()
4572 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
4726 int depth; in check_wait_context() local
4737 for (depth = curr->lockdep_depth - 1; depth >= 0; depth--) { in check_wait_context()
4738 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4742 depth++; in check_wait_context()
4746 for (; depth < curr->lockdep_depth; depth++) { in check_wait_context()
4747 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4911 unsigned int depth; in __lock_acquire() local
4948 depth = curr->lockdep_depth; in __lock_acquire()
4952 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
4957 if (depth) { /* we're holding locks */ in __lock_acquire()
4958 hlock = curr->held_locks + depth - 1; in __lock_acquire()
4976 hlock = curr->held_locks + depth; in __lock_acquire()
5023 if (!depth) { in __lock_acquire()
5045 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
5144 unsigned int depth, int *idx) in find_held_lock() argument
5149 i = depth - 1; in find_held_lock()
5177 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
5186 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
5215 unsigned int depth, merged = 0; in __lock_set_class() local
5223 depth = curr->lockdep_depth; in __lock_set_class()
5228 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
5231 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
5247 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_set_class()
5254 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)) in __lock_set_class()
5262 unsigned int depth, merged = 0; in __lock_downgrade() local
5269 depth = curr->lockdep_depth; in __lock_downgrade()
5274 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
5277 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
5290 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_downgrade()
5301 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
5316 unsigned int depth, merged = 1; in __lock_release() local
5323 depth = curr->lockdep_depth; in __lock_release()
5328 if (depth <= 0) { in __lock_release()
5337 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
5373 if (i == depth-1) in __lock_release()
5376 if (reacquire_held_locks(curr, depth, i + 1, &merged)) in __lock_release()
5384 DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged); in __lock_release()
5802 unsigned int depth; in __lock_contended() local
5805 depth = curr->lockdep_depth; in __lock_contended()
5810 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
5813 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
5843 unsigned int depth; in __lock_acquired() local
5847 depth = curr->lockdep_depth; in __lock_acquired()
5852 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
5855 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()
5952 for (i = chain->base; i < chain->base + chain->depth; i++) { in remove_class_from_lock_chain()
5965 free_chain_hlocks(chain->base, chain->depth); in remove_class_from_lock_chain()