Lines Matching refs:key
407 #define __classhashfn(key) hash_long((unsigned long)key, CLASSHASH_BITS) argument
408 #define classhashentry(key) (classhash_table + __classhashfn((key))) argument
444 static inline u64 iterate_chain_key(u64 key, u32 idx) in iterate_chain_key() argument
446 u32 k0 = key, k1 = key >> 32; in iterate_chain_key()
663 const char *__get_key_name(const struct lockdep_subclass_key *key, char *str) in __get_key_name() argument
665 return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str); in __get_key_name()
719 name = __get_key_name(class->key, str); in __print_lock_name()
750 name = __get_key_name(lock->key->subkeys, str); in print_lockdep_cache()
869 if (new_class->key - new_class->subclass == class->key) in count_matching_names()
882 struct lockdep_subclass_key *key; in look_up_lock_class() local
902 if (unlikely(!lock->key)) in look_up_lock_class()
914 key = lock->key->subkeys + subclass; in look_up_lock_class()
916 hash_head = classhashentry(key); in look_up_lock_class()
925 if (class->key == key) { in look_up_lock_class()
931 lock->key != &__lockdep_no_validate__, in look_up_lock_class()
933 lock->name, lock->key, class->name); in look_up_lock_class()
962 lock->key = (void *)can_addr; in assign_lock_key()
964 lock->key = (void *)can_addr; in assign_lock_key()
966 lock->key = (void *)lock; in assign_lock_key()
1202 static inline struct hlist_head *keyhashentry(const struct lock_class_key *key) in keyhashentry() argument
1204 unsigned long hash = hash_long((uintptr_t)key, KEYHASH_BITS); in keyhashentry()
1210 void lockdep_register_key(struct lock_class_key *key) in lockdep_register_key() argument
1216 if (WARN_ON_ONCE(static_obj(key))) in lockdep_register_key()
1218 hash_head = keyhashentry(key); in lockdep_register_key()
1224 if (WARN_ON_ONCE(k == key)) in lockdep_register_key()
1227 hlist_add_head_rcu(&key->hash_entry, hash_head); in lockdep_register_key()
1236 static bool is_dynamic_key(const struct lock_class_key *key) in is_dynamic_key() argument
1242 if (WARN_ON_ONCE(static_obj(key))) in is_dynamic_key()
1253 hash_head = keyhashentry(key); in is_dynamic_key()
1257 if (k == key) { in is_dynamic_key()
1275 struct lockdep_subclass_key *key; in register_lock_class() local
1286 if (!lock->key) { in register_lock_class()
1289 } else if (!static_obj(lock->key) && !is_dynamic_key(lock->key)) { in register_lock_class()
1293 key = lock->key->subkeys + subclass; in register_lock_class()
1294 hash_head = classhashentry(key); in register_lock_class()
1304 if (class->key == key) in register_lock_class()
1325 class->key = key; in register_lock_class()
1351 printk("\nnew class %px: %s", class->key, class->name); in register_lock_class()
2344 depth, "", class->key, class->key); in print_lock_class_header()
3062 if (!hlock_class(prev)->key || !hlock_class(next)->key) { in check_prev_add()
3069 WARN_ONCE(!debug_locks_silent && !hlock_class(prev)->key, in check_prev_add()
3073 WARN_ONCE(!debug_locks_silent && !hlock_class(next)->key, in check_prev_add()
3749 class->key, class->name); in lookup_chain_cache_add()
3757 (unsigned long long)chain_key, class->key, class->name); in lookup_chain_cache_add()
4798 struct lock_class_key *key, int subclass, in lockdep_init_map_type() argument
4827 if (DEBUG_LOCKS_WARN_ON(!key)) in lockdep_init_map_type()
4833 if (!static_obj(key) && !is_dynamic_key(key)) { in lockdep_init_map_type()
4835 printk(KERN_ERR "BUG: key %px has not been registered!\n", key); in lockdep_init_map_type()
4839 lock->key = key; in lockdep_init_map_type()
4919 if (!prove_locking || lock->key == &__lockdep_no_validate__) in __lock_acquire()
4936 printk("\nacquire class [%px] %s", class->key, class->name); in __lock_acquire()
5045 WARN_ON_ONCE(depth && !hlock_class(hlock - 1)->key); in __lock_acquire()
5046 WARN_ON_ONCE(!hlock_class(hlock)->key); in __lock_acquire()
5211 struct lock_class_key *key, unsigned int subclass, in __lock_set_class() argument
5237 lockdep_init_map_type(lock, name, key, 0, in __lock_set_class()
5536 struct lock_class_key *key, unsigned int subclass, in lock_set_class() argument
5547 if (__lock_set_class(lock, name, key, subclass, ip)) in lock_set_class()
6004 WARN_ON_ONCE(!class->key); in zap_class()
6022 WRITE_ONCE(class->key, NULL); in zap_class()
6042 memset_startat(class, 0, key); in reinit_class()
6149 if (!within(class->key, start, size) && in __lockdep_free_key_range()
6322 void lockdep_unregister_key(struct lock_class_key *key) in lockdep_unregister_key() argument
6324 struct hlist_head *hash_head = keyhashentry(key); in lockdep_unregister_key()
6332 if (WARN_ON_ONCE(static_obj(key))) in lockdep_unregister_key()
6339 if (k == key) { in lockdep_unregister_key()
6348 __lockdep_free_key_range(pf, key, 1); in lockdep_unregister_key()