Lines Matching refs:next
1631 __calc_dep_bit(struct held_lock *prev, struct held_lock *next) in __calc_dep_bit() argument
1633 return (prev->read == 0) + ((next->read != 2) << 1); in __calc_dep_bit()
1636 static inline u8 calc_dep(struct held_lock *prev, struct held_lock *next) in calc_dep() argument
1638 return 1U << __calc_dep_bit(prev, next); in calc_dep()
1646 __calc_dep_bitb(struct held_lock *prev, struct held_lock *next) in __calc_dep_bitb() argument
1648 return (next->read != 2) + ((prev->read == 0) << 1); in __calc_dep_bitb()
1651 static inline u8 calc_depb(struct held_lock *prev, struct held_lock *next) in calc_depb() argument
1653 return 1U << __calc_dep_bitb(prev, next); in calc_depb()
2553 struct held_lock *next, in print_bad_irq_dependency() argument
2575 print_lock(next); in print_bad_irq_dependency()
2582 print_lock_name(next, hlock_class(next)); in print_bad_irq_dependency()
2601 hlock_class(prev), hlock_class(next)); in print_bad_irq_dependency()
2781 struct held_lock *next) in check_irq_usage() argument
2812 bfs_init_root(&that, next); in check_irq_usage()
2859 prev, next, in check_irq_usage()
2869 struct held_lock *prev, struct held_lock *next) in check_irq_usage() argument
2993 struct lock_class *next = hlock_class(nxt); in print_deadlock_scenario() local
3003 __print_lock_name(nxt, next); in print_deadlock_scenario()
3011 struct held_lock *next) in print_deadlock_bug() argument
3027 print_lock(next); in print_deadlock_bug()
3033 class->cmp_fn(prev->instance, next->instance)); in print_deadlock_bug()
3037 print_deadlock_scenario(next, prev); in print_deadlock_bug()
3057 check_deadlock(struct task_struct *curr, struct held_lock *next) in check_deadlock() argument
3067 if (prev->instance == next->nest_lock) in check_deadlock()
3070 if (hlock_class(prev) != hlock_class(next)) in check_deadlock()
3077 if ((next->read == 2) && prev->read) in check_deadlock()
3083 class->cmp_fn(prev->instance, next->instance) < 0) in check_deadlock()
3093 print_deadlock_bug(curr, prev, next); in check_deadlock()
3123 struct held_lock *next, u16 distance, in check_prev_add() argument
3129 if (!hlock_class(prev)->key || !hlock_class(next)->key) { in check_prev_add()
3140 WARN_ONCE(!debug_locks_silent && !hlock_class(next)->key, in check_prev_add()
3142 hlock_class(next), in check_prev_add()
3143 hlock_class(next)->name); in check_prev_add()
3147 if (prev->class_idx == next->class_idx) { in check_prev_add()
3151 class->cmp_fn(prev->instance, next->instance) < 0) in check_prev_add()
3165 ret = check_noncircular(next, prev, trace); in check_prev_add()
3169 if (!check_irq_usage(curr, prev, next)) in check_prev_add()
3181 if (entry->class == hlock_class(next)) { in check_prev_add()
3184 entry->dep |= calc_dep(prev, next); in check_prev_add()
3202 list_for_each_entry(entry, &hlock_class(next)->locks_before, entry) { in check_prev_add()
3206 entry->dep |= calc_depb(prev, next); in check_prev_add()
3219 ret = check_redundant(prev, next); in check_prev_add()
3235 ret = add_lock_to_list(hlock_class(next), hlock_class(prev), in check_prev_add()
3237 calc_dep(prev, next), *trace); in check_prev_add()
3242 ret = add_lock_to_list(hlock_class(prev), hlock_class(next), in check_prev_add()
3243 &hlock_class(next)->locks_before, distance, in check_prev_add()
3244 calc_depb(prev, next), *trace); in check_prev_add()
3258 check_prevs_add(struct task_struct *curr, struct held_lock *next) in check_prevs_add() argument
3284 int ret = check_prev_add(curr, hlock, next, distance, &trace); in check_prevs_add()
3378 int next = chain_hlocks[offset]; in chain_block_next() local
3380 WARN_ON_ONCE(!(next & CHAIN_BLK_FLAG)); in chain_block_next()
3382 if (next == CHAIN_BLK_LIST_END) in chain_block_next()
3385 next &= ~CHAIN_BLK_FLAG; in chain_block_next()
3386 next <<= 16; in chain_block_next()
3387 next |= chain_hlocks[offset + 1]; in chain_block_next()
3389 return next; in chain_block_next()
3400 static inline void init_chain_block(int offset, int next, int bucket, int size) in init_chain_block() argument
3402 chain_hlocks[offset] = (next >> 16) | CHAIN_BLK_FLAG; in init_chain_block()
3403 chain_hlocks[offset + 1] = (u16)next; in init_chain_block()
3414 int next = chain_block_buckets[bucket]; in add_chain_block() local
3451 init_chain_block(offset, next, bucket, size); in add_chain_block()
3466 static inline void del_chain_block(int bucket, int size, int next) in del_chain_block() argument
3469 chain_block_buckets[bucket] = next; in del_chain_block()
4852 static int check_wait_context(struct task_struct *curr, struct held_lock *next) in check_wait_context() argument
4854 u8 next_inner = hlock_class(next)->wait_type_inner; in check_wait_context()
4855 u8 next_outer = hlock_class(next)->wait_type_outer; in check_wait_context()
4859 if (!next_inner || next->trylock) in check_wait_context()
4870 if (prev->irq_context != next->irq_context) in check_wait_context()
4902 return print_lock_invalid_wait_context(curr, next); in check_wait_context()
4927 struct held_lock *next) in check_wait_context() argument
6287 WARN_ON_ONCE(!class->lock_entry.next); in reinit_class()
6291 WARN_ON_ONCE(!class->lock_entry.next); in reinit_class()