Lines Matching refs:swhash
7937 find_swevent_head_rcu(struct swevent_htable *swhash, u64 type, u32 event_id) in find_swevent_head_rcu() argument
7941 hlist = rcu_dereference(swhash->swevent_hlist); in find_swevent_head_rcu()
7950 find_swevent_head(struct swevent_htable *swhash, struct perf_event *event) in find_swevent_head() argument
7961 hlist = rcu_dereference_protected(swhash->swevent_hlist, in find_swevent_head()
7974 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in do_perf_sw_event() local
7979 head = find_swevent_head_rcu(swhash, type, event_id); in do_perf_sw_event()
7995 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_get_recursion_context() local
7997 return get_recursion_context(swhash->recursion); in perf_swevent_get_recursion_context()
8003 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_put_recursion_context() local
8005 put_recursion_context(swhash->recursion, rctx); in perf_swevent_put_recursion_context()
8041 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_add() local
8052 head = find_swevent_head(swhash, event); in perf_swevent_add()
8079 swevent_hlist_deref(struct swevent_htable *swhash) in swevent_hlist_deref() argument
8081 return rcu_dereference_protected(swhash->swevent_hlist, in swevent_hlist_deref()
8082 lockdep_is_held(&swhash->hlist_mutex)); in swevent_hlist_deref()
8085 static void swevent_hlist_release(struct swevent_htable *swhash) in swevent_hlist_release() argument
8087 struct swevent_hlist *hlist = swevent_hlist_deref(swhash); in swevent_hlist_release()
8092 RCU_INIT_POINTER(swhash->swevent_hlist, NULL); in swevent_hlist_release()
8098 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_put_cpu() local
8100 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
8102 if (!--swhash->hlist_refcount) in swevent_hlist_put_cpu()
8103 swevent_hlist_release(swhash); in swevent_hlist_put_cpu()
8105 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
8118 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_get_cpu() local
8121 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
8122 if (!swevent_hlist_deref(swhash) && in swevent_hlist_get_cpu()
8131 rcu_assign_pointer(swhash->swevent_hlist, hlist); in swevent_hlist_get_cpu()
8133 swhash->hlist_refcount++; in swevent_hlist_get_cpu()
8135 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
11562 struct swevent_htable *swhash; in perf_event_init_all_cpus() local
11568 swhash = &per_cpu(swevent_htable, cpu); in perf_event_init_all_cpus()
11569 mutex_init(&swhash->hlist_mutex); in perf_event_init_all_cpus()
11584 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in perf_swevent_init_cpu() local
11586 mutex_lock(&swhash->hlist_mutex); in perf_swevent_init_cpu()
11587 if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { in perf_swevent_init_cpu()
11592 rcu_assign_pointer(swhash->swevent_hlist, hlist); in perf_swevent_init_cpu()
11594 mutex_unlock(&swhash->hlist_mutex); in perf_swevent_init_cpu()