Lines Matching refs:swhash
9346 find_swevent_head_rcu(struct swevent_htable *swhash, u64 type, u32 event_id) in find_swevent_head_rcu() argument
9350 hlist = rcu_dereference(swhash->swevent_hlist); in find_swevent_head_rcu()
9359 find_swevent_head(struct swevent_htable *swhash, struct perf_event *event) in find_swevent_head() argument
9370 hlist = rcu_dereference_protected(swhash->swevent_hlist, in find_swevent_head()
9383 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in do_perf_sw_event() local
9388 head = find_swevent_head_rcu(swhash, type, event_id); in do_perf_sw_event()
9404 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_get_recursion_context() local
9406 return get_recursion_context(swhash->recursion); in perf_swevent_get_recursion_context()
9412 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_put_recursion_context() local
9414 put_recursion_context(swhash->recursion, rctx); in perf_swevent_put_recursion_context()
9450 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_add() local
9461 head = find_swevent_head(swhash, event); in perf_swevent_add()
9488 swevent_hlist_deref(struct swevent_htable *swhash) in swevent_hlist_deref() argument
9490 return rcu_dereference_protected(swhash->swevent_hlist, in swevent_hlist_deref()
9491 lockdep_is_held(&swhash->hlist_mutex)); in swevent_hlist_deref()
9494 static void swevent_hlist_release(struct swevent_htable *swhash) in swevent_hlist_release() argument
9496 struct swevent_hlist *hlist = swevent_hlist_deref(swhash); in swevent_hlist_release()
9501 RCU_INIT_POINTER(swhash->swevent_hlist, NULL); in swevent_hlist_release()
9507 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_put_cpu() local
9509 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
9511 if (!--swhash->hlist_refcount) in swevent_hlist_put_cpu()
9512 swevent_hlist_release(swhash); in swevent_hlist_put_cpu()
9514 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
9527 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_get_cpu() local
9530 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
9531 if (!swevent_hlist_deref(swhash) && in swevent_hlist_get_cpu()
9540 rcu_assign_pointer(swhash->swevent_hlist, hlist); in swevent_hlist_get_cpu()
9542 swhash->hlist_refcount++; in swevent_hlist_get_cpu()
9544 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
13207 struct swevent_htable *swhash; in perf_event_init_all_cpus() local
13213 swhash = &per_cpu(swevent_htable, cpu); in perf_event_init_all_cpus()
13214 mutex_init(&swhash->hlist_mutex); in perf_event_init_all_cpus()
13229 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in perf_swevent_init_cpu() local
13231 mutex_lock(&swhash->hlist_mutex); in perf_swevent_init_cpu()
13232 if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { in perf_swevent_init_cpu()
13237 rcu_assign_pointer(swhash->swevent_hlist, hlist); in perf_swevent_init_cpu()
13239 mutex_unlock(&swhash->hlist_mutex); in perf_swevent_init_cpu()