Lines Matching refs:depth

780 	int i, depth = READ_ONCE(p->lockdep_depth);  in lockdep_print_held_locks()  local
782 if (!depth) in lockdep_print_held_locks()
785 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
786 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
793 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
1050 for (i = chain->base; i < chain->base + chain->depth; i++) in check_lock_chain_key()
1540 int depth = 0; in get_lock_depth() local
1545 depth++; in get_lock_depth()
1547 return depth; in get_lock_depth()
1865 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1869 printk("\n-> #%u", depth); in print_circular_bug_entry()
1930 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1954 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
2027 int depth; in print_circular_bug() local
2036 depth = get_lock_depth(target); in print_circular_bug()
2038 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
2044 print_circular_bug_entry(parent, --depth); in print_circular_bug()
2328 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
2332 printk("%*s->", depth, ""); in print_lock_class_header()
2341 int len = depth; in print_lock_class_header()
2343 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
2348 printk("%*s }\n", depth, ""); in print_lock_class_header()
2351 depth, "", class->key, class->key); in print_lock_class_header()
2411 int depth; in print_shortest_lock_dependencies() local
2414 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
2417 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
2418 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
2422 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
2428 depth--; in print_shortest_lock_dependencies()
2429 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
2458 int depth; in print_shortest_lock_dependencies_backwards() local
2461 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies_backwards()
2464 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies_backwards()
2466 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies_backwards()
2477 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies_backwards()
2483 depth--; in print_shortest_lock_dependencies_backwards()
2484 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies_backwards()
3193 int depth = curr->lockdep_depth; in check_prevs_add() local
3201 if (!depth) in check_prevs_add()
3207 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3208 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3212 u16 distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
3213 hlock = curr->held_locks + depth - 1; in check_prevs_add()
3230 depth--; in check_prevs_add()
3234 if (!depth) in check_prevs_add()
3239 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3240 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3536 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
3539 printk("depth: %u (irq_context %u)\n", depth - i + 1, in print_chain_keys_held_locks()
3541 for (; i < depth; i++) { in print_chain_keys_held_locks()
3558 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
3559 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
3606 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
3611 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
3685 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
3691 j = alloc_chain_hlocks(chain->depth); in add_chain_cache()
3702 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
3993 int depth; in print_irq_inversion_bug() local
4016 depth = get_lock_depth(other); in print_irq_inversion_bug()
4018 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
4024 depth--; in print_irq_inversion_bug()
4025 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
4570 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
4575 if (depth) { in separate_irq_context()
4578 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
4732 int depth; in check_wait_context() local
4743 for (depth = curr->lockdep_depth - 1; depth >= 0; depth--) { in check_wait_context()
4744 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4748 depth++; in check_wait_context()
4752 for (; depth < curr->lockdep_depth; depth++) { in check_wait_context()
4753 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4917 unsigned int depth; in __lock_acquire() local
4954 depth = curr->lockdep_depth; in __lock_acquire()
4958 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
4963 if (depth) { /* we're holding locks */ in __lock_acquire()
4964 hlock = curr->held_locks + depth - 1; in __lock_acquire()
4982 hlock = curr->held_locks + depth; in __lock_acquire()
5029 if (!depth) { in __lock_acquire()
5051 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
5150 unsigned int depth, int *idx) in find_held_lock() argument
5155 i = depth - 1; in find_held_lock()
5183 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
5192 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
5221 unsigned int depth, merged = 0; in __lock_set_class() local
5229 depth = curr->lockdep_depth; in __lock_set_class()
5234 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
5237 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
5253 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_set_class()
5260 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)) in __lock_set_class()
5268 unsigned int depth, merged = 0; in __lock_downgrade() local
5275 depth = curr->lockdep_depth; in __lock_downgrade()
5280 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
5283 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
5296 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_downgrade()
5307 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
5322 unsigned int depth, merged = 1; in __lock_release() local
5329 depth = curr->lockdep_depth; in __lock_release()
5334 if (depth <= 0) { in __lock_release()
5343 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
5379 if (i == depth-1) in __lock_release()
5382 if (reacquire_held_locks(curr, depth, i + 1, &merged)) in __lock_release()
5390 DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged); in __lock_release()
5808 unsigned int depth; in __lock_contended() local
5811 depth = curr->lockdep_depth; in __lock_contended()
5816 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
5819 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
5849 unsigned int depth; in __lock_acquired() local
5853 depth = curr->lockdep_depth; in __lock_acquired()
5858 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
5861 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()
5958 for (i = chain->base; i < chain->base + chain->depth; i++) { in remove_class_from_lock_chain()
5971 free_chain_hlocks(chain->base, chain->depth); in remove_class_from_lock_chain()