Lines Matching refs:swhash
8359 find_swevent_head_rcu(struct swevent_htable *swhash, u64 type, u32 event_id) in find_swevent_head_rcu() argument
8363 hlist = rcu_dereference(swhash->swevent_hlist); in find_swevent_head_rcu()
8372 find_swevent_head(struct swevent_htable *swhash, struct perf_event *event) in find_swevent_head() argument
8383 hlist = rcu_dereference_protected(swhash->swevent_hlist, in find_swevent_head()
8396 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in do_perf_sw_event() local
8401 head = find_swevent_head_rcu(swhash, type, event_id); in do_perf_sw_event()
8417 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_get_recursion_context() local
8419 return get_recursion_context(swhash->recursion); in perf_swevent_get_recursion_context()
8425 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_put_recursion_context() local
8427 put_recursion_context(swhash->recursion, rctx); in perf_swevent_put_recursion_context()
8463 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_add() local
8474 head = find_swevent_head(swhash, event); in perf_swevent_add()
8501 swevent_hlist_deref(struct swevent_htable *swhash) in swevent_hlist_deref() argument
8503 return rcu_dereference_protected(swhash->swevent_hlist, in swevent_hlist_deref()
8504 lockdep_is_held(&swhash->hlist_mutex)); in swevent_hlist_deref()
8507 static void swevent_hlist_release(struct swevent_htable *swhash) in swevent_hlist_release() argument
8509 struct swevent_hlist *hlist = swevent_hlist_deref(swhash); in swevent_hlist_release()
8514 RCU_INIT_POINTER(swhash->swevent_hlist, NULL); in swevent_hlist_release()
8520 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_put_cpu() local
8522 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
8524 if (!--swhash->hlist_refcount) in swevent_hlist_put_cpu()
8525 swevent_hlist_release(swhash); in swevent_hlist_put_cpu()
8527 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
8540 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_get_cpu() local
8543 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
8544 if (!swevent_hlist_deref(swhash) && in swevent_hlist_get_cpu()
8553 rcu_assign_pointer(swhash->swevent_hlist, hlist); in swevent_hlist_get_cpu()
8555 swhash->hlist_refcount++; in swevent_hlist_get_cpu()
8557 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
12086 struct swevent_htable *swhash; in perf_event_init_all_cpus() local
12092 swhash = &per_cpu(swevent_htable, cpu); in perf_event_init_all_cpus()
12093 mutex_init(&swhash->hlist_mutex); in perf_event_init_all_cpus()
12108 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in perf_swevent_init_cpu() local
12110 mutex_lock(&swhash->hlist_mutex); in perf_swevent_init_cpu()
12111 if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { in perf_swevent_init_cpu()
12116 rcu_assign_pointer(swhash->swevent_hlist, hlist); in perf_swevent_init_cpu()
12118 mutex_unlock(&swhash->hlist_mutex); in perf_swevent_init_cpu()