Lines Matching refs:next
1575 __calc_dep_bit(struct held_lock *prev, struct held_lock *next) in __calc_dep_bit() argument
1577 return (prev->read == 0) + ((next->read != 2) << 1); in __calc_dep_bit()
1580 static inline u8 calc_dep(struct held_lock *prev, struct held_lock *next) in calc_dep() argument
1582 return 1U << __calc_dep_bit(prev, next); in calc_dep()
1590 __calc_dep_bitb(struct held_lock *prev, struct held_lock *next) in __calc_dep_bitb() argument
1592 return (next->read != 2) + ((prev->read == 0) << 1); in __calc_dep_bitb()
1595 static inline u8 calc_depb(struct held_lock *prev, struct held_lock *next) in calc_depb() argument
1597 return 1U << __calc_dep_bitb(prev, next); in calc_depb()
2498 struct held_lock *next, in print_bad_irq_dependency() argument
2518 print_lock(next); in print_bad_irq_dependency()
2525 print_lock_name(hlock_class(next)); in print_bad_irq_dependency()
2544 hlock_class(prev), hlock_class(next)); in print_bad_irq_dependency()
2725 struct held_lock *next) in check_irq_usage() argument
2756 bfs_init_root(&that, next); in check_irq_usage()
2803 prev, next, in check_irq_usage()
2813 struct held_lock *prev, struct held_lock *next) in check_irq_usage() argument
2842 struct lock_class *next = hlock_class(nxt); in print_deadlock_scenario() local
2852 __print_lock_name(next); in print_deadlock_scenario()
2860 struct held_lock *next) in print_deadlock_bug() argument
2872 print_lock(next); in print_deadlock_bug()
2877 print_deadlock_scenario(next, prev); in print_deadlock_bug()
2895 check_deadlock(struct task_struct *curr, struct held_lock *next) in check_deadlock() argument
2904 if (prev->instance == next->nest_lock) in check_deadlock()
2907 if (hlock_class(prev) != hlock_class(next)) in check_deadlock()
2914 if ((next->read == 2) && prev->read) in check_deadlock()
2924 print_deadlock_bug(curr, prev, next); in check_deadlock()
2954 struct held_lock *next, u16 distance, in check_prev_add() argument
2960 if (!hlock_class(prev)->key || !hlock_class(next)->key) { in check_prev_add()
2971 WARN_ONCE(!debug_locks_silent && !hlock_class(next)->key, in check_prev_add()
2973 hlock_class(next), in check_prev_add()
2974 hlock_class(next)->name); in check_prev_add()
2988 ret = check_noncircular(next, prev, trace); in check_prev_add()
2992 if (!check_irq_usage(curr, prev, next)) in check_prev_add()
3004 if (entry->class == hlock_class(next)) { in check_prev_add()
3007 entry->dep |= calc_dep(prev, next); in check_prev_add()
3025 list_for_each_entry(entry, &hlock_class(next)->locks_before, entry) { in check_prev_add()
3029 entry->dep |= calc_depb(prev, next); in check_prev_add()
3043 ret = check_redundant(prev, next); in check_prev_add()
3060 ret = add_lock_to_list(hlock_class(next), hlock_class(prev), in check_prev_add()
3062 next->acquire_ip, distance, in check_prev_add()
3063 calc_dep(prev, next), in check_prev_add()
3069 ret = add_lock_to_list(hlock_class(prev), hlock_class(next), in check_prev_add()
3070 &hlock_class(next)->locks_before, in check_prev_add()
3071 next->acquire_ip, distance, in check_prev_add()
3072 calc_depb(prev, next), in check_prev_add()
3087 check_prevs_add(struct task_struct *curr, struct held_lock *next) in check_prevs_add() argument
3113 int ret = check_prev_add(curr, hlock, next, distance, &trace); in check_prevs_add()
3207 int next = chain_hlocks[offset]; in chain_block_next() local
3209 WARN_ON_ONCE(!(next & CHAIN_BLK_FLAG)); in chain_block_next()
3211 if (next == CHAIN_BLK_LIST_END) in chain_block_next()
3214 next &= ~CHAIN_BLK_FLAG; in chain_block_next()
3215 next <<= 16; in chain_block_next()
3216 next |= chain_hlocks[offset + 1]; in chain_block_next()
3218 return next; in chain_block_next()
3229 static inline void init_chain_block(int offset, int next, int bucket, int size) in init_chain_block() argument
3231 chain_hlocks[offset] = (next >> 16) | CHAIN_BLK_FLAG; in init_chain_block()
3232 chain_hlocks[offset + 1] = (u16)next; in init_chain_block()
3243 int next = chain_block_buckets[bucket]; in add_chain_block() local
3280 init_chain_block(offset, next, bucket, size); in add_chain_block()
3295 static inline void del_chain_block(int bucket, int size, int next) in del_chain_block() argument
3298 chain_block_buckets[bucket] = next; in del_chain_block()
4626 static int check_wait_context(struct task_struct *curr, struct held_lock *next) in check_wait_context() argument
4628 u8 next_inner = hlock_class(next)->wait_type_inner; in check_wait_context()
4629 u8 next_outer = hlock_class(next)->wait_type_outer; in check_wait_context()
4633 if (!next_inner || next->trylock) in check_wait_context()
4644 if (prev->irq_context != next->irq_context) in check_wait_context()
4667 return print_lock_invalid_wait_context(curr, next); in check_wait_context()
4692 struct held_lock *next) in check_wait_context() argument
5942 WARN_ON_ONCE(!class->lock_entry.next); in reinit_class()
5946 WARN_ON_ONCE(!class->lock_entry.next); in reinit_class()