Lines Matching refs:depth

698 	int i, depth = READ_ONCE(p->lockdep_depth);  in lockdep_print_held_locks()  local
700 if (!depth) in lockdep_print_held_locks()
703 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
704 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
711 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
950 for (i = chain->base; i < chain->base + chain->depth; i++) in check_lock_chain_key()
1433 int depth = 0; in get_lock_depth() local
1438 depth++; in get_lock_depth()
1440 return depth; in get_lock_depth()
1552 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1556 printk("\n-> #%u", depth); in print_circular_bug_entry()
1617 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1641 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
1657 int depth; in print_circular_bug() local
1666 depth = get_lock_depth(target); in print_circular_bug()
1668 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
1674 print_circular_bug_entry(parent, --depth); in print_circular_bug()
1913 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
1917 printk("%*s->", depth, ""); in print_lock_class_header()
1926 int len = depth; in print_lock_class_header()
1928 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
1933 printk("%*s }\n", depth, ""); in print_lock_class_header()
1936 depth, "", class->key, class->key); in print_lock_class_header()
1947 int depth; in print_shortest_lock_dependencies() local
1950 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
1953 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
1954 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
1958 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
1964 depth--; in print_shortest_lock_dependencies()
1965 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
2554 int depth = curr->lockdep_depth; in check_prevs_add() local
2562 if (!depth) in check_prevs_add()
2568 if (curr->held_locks[depth].irq_context != in check_prevs_add()
2569 curr->held_locks[depth-1].irq_context) in check_prevs_add()
2573 int distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
2574 hlock = curr->held_locks + depth - 1; in check_prevs_add()
2596 depth--; in check_prevs_add()
2600 if (!depth) in check_prevs_add()
2605 if (curr->held_locks[depth].irq_context != in check_prevs_add()
2606 curr->held_locks[depth-1].irq_context) in check_prevs_add()
2672 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
2675 printk("depth: %u (irq_context %u)\n", depth - i + 1, in print_chain_keys_held_locks()
2677 for (; i < depth; i++) { in print_chain_keys_held_locks()
2694 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
2695 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
2742 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
2747 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
2822 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
2828 if (likely(nr_chain_hlocks + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) { in add_chain_cache()
2830 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
2835 nr_chain_hlocks += chain->depth; in add_chain_cache()
3130 int depth; in print_irq_inversion_bug() local
3153 depth = get_lock_depth(other); in print_irq_inversion_bug()
3155 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
3161 depth--; in print_irq_inversion_bug()
3162 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
3606 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
3611 if (depth) { in separate_irq_context()
3614 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
3820 unsigned int depth; in __lock_acquire() local
3857 depth = curr->lockdep_depth; in __lock_acquire()
3861 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
3866 if (depth) { in __lock_acquire()
3867 hlock = curr->held_locks + depth - 1; in __lock_acquire()
3885 hlock = curr->held_locks + depth; in __lock_acquire()
3929 if (!depth) { in __lock_acquire()
3951 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
4050 unsigned int depth, int *idx) in find_held_lock() argument
4055 i = depth - 1; in find_held_lock()
4083 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
4092 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
4121 unsigned int depth, merged = 0; in __lock_set_class() local
4129 depth = curr->lockdep_depth; in __lock_set_class()
4134 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
4137 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
4150 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_set_class()
4157 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)) in __lock_set_class()
4165 unsigned int depth, merged = 0; in __lock_downgrade() local
4172 depth = curr->lockdep_depth; in __lock_downgrade()
4177 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
4180 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
4193 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_downgrade()
4204 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
4221 unsigned int depth, merged = 1; in __lock_release() local
4228 depth = curr->lockdep_depth; in __lock_release()
4233 if (depth <= 0) { in __lock_release()
4242 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
4278 if (i == depth-1) in __lock_release()
4281 if (reacquire_held_locks(curr, depth, i + 1, &merged)) in __lock_release()
4289 DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged); in __lock_release()
4622 unsigned int depth; in __lock_contended() local
4625 depth = curr->lockdep_depth; in __lock_contended()
4630 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
4633 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
4663 unsigned int depth; in __lock_acquired() local
4667 depth = curr->lockdep_depth; in __lock_acquired()
4672 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
4675 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()
4779 for (i = chain->base; i < chain->base + chain->depth; i++) { in remove_class_from_lock_chain()
4783 if (--chain->depth > 0) { in remove_class_from_lock_chain()
4785 (chain->base + chain->depth - i) * in remove_class_from_lock_chain()
4799 for (i = chain->base; i < chain->base + chain->depth; i++) in remove_class_from_lock_chain()
4801 if (chain->depth && chain->chain_key == chain_key) in remove_class_from_lock_chain()
4811 if (chain->depth == 0) in remove_class_from_lock_chain()