Lines Matching refs:swhash
9872 find_swevent_head_rcu(struct swevent_htable *swhash, u64 type, u32 event_id) in find_swevent_head_rcu() argument
9876 hlist = rcu_dereference(swhash->swevent_hlist); in find_swevent_head_rcu()
9885 find_swevent_head(struct swevent_htable *swhash, struct perf_event *event) in find_swevent_head() argument
9896 hlist = rcu_dereference_protected(swhash->swevent_hlist, in find_swevent_head()
9909 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in do_perf_sw_event() local
9914 head = find_swevent_head_rcu(swhash, type, event_id); in do_perf_sw_event()
9930 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_get_recursion_context() local
9932 return get_recursion_context(swhash->recursion); in perf_swevent_get_recursion_context()
9938 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_put_recursion_context() local
9940 put_recursion_context(swhash->recursion, rctx); in perf_swevent_put_recursion_context()
9976 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_add() local
9987 head = find_swevent_head(swhash, event); in perf_swevent_add()
10014 swevent_hlist_deref(struct swevent_htable *swhash) in swevent_hlist_deref() argument
10016 return rcu_dereference_protected(swhash->swevent_hlist, in swevent_hlist_deref()
10017 lockdep_is_held(&swhash->hlist_mutex)); in swevent_hlist_deref()
10020 static void swevent_hlist_release(struct swevent_htable *swhash) in swevent_hlist_release() argument
10022 struct swevent_hlist *hlist = swevent_hlist_deref(swhash); in swevent_hlist_release()
10027 RCU_INIT_POINTER(swhash->swevent_hlist, NULL); in swevent_hlist_release()
10033 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_put_cpu() local
10035 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
10037 if (!--swhash->hlist_refcount) in swevent_hlist_put_cpu()
10038 swevent_hlist_release(swhash); in swevent_hlist_put_cpu()
10040 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
10053 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_get_cpu() local
10056 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
10057 if (!swevent_hlist_deref(swhash) && in swevent_hlist_get_cpu()
10066 rcu_assign_pointer(swhash->swevent_hlist, hlist); in swevent_hlist_get_cpu()
10068 swhash->hlist_refcount++; in swevent_hlist_get_cpu()
10070 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
13767 struct swevent_htable *swhash; in perf_event_init_all_cpus() local
13774 swhash = &per_cpu(swevent_htable, cpu); in perf_event_init_all_cpus()
13775 mutex_init(&swhash->hlist_mutex); in perf_event_init_all_cpus()
13794 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in perf_swevent_init_cpu() local
13796 mutex_lock(&swhash->hlist_mutex); in perf_swevent_init_cpu()
13797 if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { in perf_swevent_init_cpu()
13802 rcu_assign_pointer(swhash->swevent_hlist, hlist); in perf_swevent_init_cpu()
13804 mutex_unlock(&swhash->hlist_mutex); in perf_swevent_init_cpu()