Lines Matching refs:depth

783 	int i, depth = READ_ONCE(p->lockdep_depth);  in lockdep_print_held_locks()  local
785 if (!depth) in lockdep_print_held_locks()
788 printk("%d lock%s held by %s/%d:\n", depth, in lockdep_print_held_locks()
789 depth > 1 ? "s" : "", p->comm, task_pid_nr(p)); in lockdep_print_held_locks()
796 for (i = 0; i < depth; i++) { in lockdep_print_held_locks()
1045 for (i = chain->base; i < chain->base + chain->depth; i++) in check_lock_chain_key()
1535 int depth = 0; in get_lock_depth() local
1540 depth++; in get_lock_depth()
1542 return depth; in get_lock_depth()
1860 print_circular_bug_entry(struct lock_list *target, int depth) in print_circular_bug_entry() argument
1864 printk("\n-> #%u", depth); in print_circular_bug_entry()
1935 print_circular_bug_header(struct lock_list *entry, unsigned int depth, in print_circular_bug_header() argument
1959 print_circular_bug_entry(entry, depth); in print_circular_bug_header()
2032 int depth; in print_circular_bug() local
2041 depth = get_lock_depth(target); in print_circular_bug()
2043 print_circular_bug_header(target, depth, check_src, check_tgt); in print_circular_bug()
2049 print_circular_bug_entry(parent, --depth); in print_circular_bug()
2343 static void print_lock_class_header(struct lock_class *class, int depth) in print_lock_class_header() argument
2347 printk("%*s->", depth, ""); in print_lock_class_header()
2356 int len = depth; in print_lock_class_header()
2358 len += printk("%*s %s", depth, "", usage_str[bit]); in print_lock_class_header()
2363 printk("%*s }\n", depth, ""); in print_lock_class_header()
2366 depth, "", class->key, class->key); in print_lock_class_header()
2426 int depth; in print_shortest_lock_dependencies() local
2429 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies()
2432 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies()
2433 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies()
2437 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies()
2443 depth--; in print_shortest_lock_dependencies()
2444 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies()
2473 int depth; in print_shortest_lock_dependencies_backwards() local
2476 depth = get_lock_depth(leaf); in print_shortest_lock_dependencies_backwards()
2479 print_lock_class_header(entry->class, depth); in print_shortest_lock_dependencies_backwards()
2481 printk("%*s ... acquired at:\n", depth, ""); in print_shortest_lock_dependencies_backwards()
2492 if (depth == 0 && (entry != root)) { in print_shortest_lock_dependencies_backwards()
2498 depth--; in print_shortest_lock_dependencies_backwards()
2499 } while (entry && (depth >= 0)); in print_shortest_lock_dependencies_backwards()
3230 int depth = curr->lockdep_depth; in check_prevs_add() local
3238 if (!depth) in check_prevs_add()
3244 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3245 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3249 u16 distance = curr->lockdep_depth - depth + 1; in check_prevs_add()
3250 hlock = curr->held_locks + depth - 1; in check_prevs_add()
3267 depth--; in check_prevs_add()
3271 if (!depth) in check_prevs_add()
3276 if (curr->held_locks[depth].irq_context != in check_prevs_add()
3277 curr->held_locks[depth-1].irq_context) in check_prevs_add()
3573 int depth = curr->lockdep_depth; in print_chain_keys_held_locks() local
3576 printk("depth: %u (irq_context %u)\n", depth - i + 1, in print_chain_keys_held_locks()
3578 for (; i < depth; i++) { in print_chain_keys_held_locks()
3595 printk("depth: %u\n", chain->depth); in print_chain_keys_chain()
3596 for (i = 0; i < chain->depth; i++) { in print_chain_keys_chain()
3643 if (DEBUG_LOCKS_WARN_ON(chain->depth != curr->lockdep_depth - (i - 1))) { in check_no_collision()
3648 for (j = 0; j < chain->depth - 1; j++, i++) { in check_no_collision()
3722 chain->depth = curr->lockdep_depth + 1 - i; in add_chain_cache()
3728 j = alloc_chain_hlocks(chain->depth); in add_chain_cache()
3739 for (j = 0; j < chain->depth - 1; j++, i++) { in add_chain_cache()
4030 int depth; in print_irq_inversion_bug() local
4053 depth = get_lock_depth(other); in print_irq_inversion_bug()
4055 if (depth == 0 && (entry != root)) { in print_irq_inversion_bug()
4061 depth--; in print_irq_inversion_bug()
4062 } while (entry && entry != root && (depth >= 0)); in print_irq_inversion_bug()
4613 unsigned int depth = curr->lockdep_depth; in separate_irq_context() local
4618 if (depth) { in separate_irq_context()
4621 prev_hlock = curr->held_locks + depth-1; in separate_irq_context()
4775 int depth; in check_wait_context() local
4786 for (depth = curr->lockdep_depth - 1; depth >= 0; depth--) { in check_wait_context()
4787 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4791 depth++; in check_wait_context()
4795 for (; depth < curr->lockdep_depth; depth++) { in check_wait_context()
4796 struct held_lock *prev = curr->held_locks + depth; in check_wait_context()
4996 unsigned int depth; in __lock_acquire() local
5033 depth = curr->lockdep_depth; in __lock_acquire()
5037 if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) in __lock_acquire()
5042 if (depth && !sync) { in __lock_acquire()
5044 hlock = curr->held_locks + depth - 1; in __lock_acquire()
5062 hlock = curr->held_locks + depth; in __lock_acquire()
5110 if (!depth) { in __lock_acquire()
5132 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
5235 unsigned int depth, int *idx) in find_held_lock() argument
5240 i = depth - 1; in find_held_lock()
5268 static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, in reacquire_held_locks() argument
5277 for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { in reacquire_held_locks()
5306 unsigned int depth, merged = 0; in __lock_set_class() local
5314 depth = curr->lockdep_depth; in __lock_set_class()
5319 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_set_class()
5322 hlock = find_held_lock(curr, lock, depth, &i); in __lock_set_class()
5338 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_set_class()
5345 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged)) in __lock_set_class()
5353 unsigned int depth, merged = 0; in __lock_downgrade() local
5360 depth = curr->lockdep_depth; in __lock_downgrade()
5365 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_downgrade()
5368 hlock = find_held_lock(curr, lock, depth, &i); in __lock_downgrade()
5381 if (reacquire_held_locks(curr, depth, i, &merged)) in __lock_downgrade()
5392 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) in __lock_downgrade()
5407 unsigned int depth, merged = 1; in __lock_release() local
5414 depth = curr->lockdep_depth; in __lock_release()
5419 if (depth <= 0) { in __lock_release()
5428 hlock = find_held_lock(curr, lock, depth, &i); in __lock_release()
5464 if (i == depth-1) in __lock_release()
5467 if (reacquire_held_locks(curr, depth, i + 1, &merged)) in __lock_release()
5475 DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - merged); in __lock_release()
5921 unsigned int depth; in __lock_contended() local
5924 depth = curr->lockdep_depth; in __lock_contended()
5929 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_contended()
5932 hlock = find_held_lock(curr, lock, depth, &i); in __lock_contended()
5962 unsigned int depth; in __lock_acquired() local
5966 depth = curr->lockdep_depth; in __lock_acquired()
5971 if (DEBUG_LOCKS_WARN_ON(!depth)) in __lock_acquired()
5974 hlock = find_held_lock(curr, lock, depth, &i); in __lock_acquired()
6071 for (i = chain->base; i < chain->base + chain->depth; i++) { in remove_class_from_lock_chain()
6084 free_chain_hlocks(chain->base, chain->depth); in remove_class_from_lock_chain()