Lines Matching refs:swhash
9734 find_swevent_head_rcu(struct swevent_htable *swhash, u64 type, u32 event_id) in find_swevent_head_rcu() argument
9738 hlist = rcu_dereference(swhash->swevent_hlist); in find_swevent_head_rcu()
9747 find_swevent_head(struct swevent_htable *swhash, struct perf_event *event) in find_swevent_head() argument
9758 hlist = rcu_dereference_protected(swhash->swevent_hlist, in find_swevent_head()
9771 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in do_perf_sw_event() local
9776 head = find_swevent_head_rcu(swhash, type, event_id); in do_perf_sw_event()
9792 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_get_recursion_context() local
9794 return get_recursion_context(swhash->recursion); in perf_swevent_get_recursion_context()
9800 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_put_recursion_context() local
9802 put_recursion_context(swhash->recursion, rctx); in perf_swevent_put_recursion_context()
9838 struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable); in perf_swevent_add() local
9849 head = find_swevent_head(swhash, event); in perf_swevent_add()
9876 swevent_hlist_deref(struct swevent_htable *swhash) in swevent_hlist_deref() argument
9878 return rcu_dereference_protected(swhash->swevent_hlist, in swevent_hlist_deref()
9879 lockdep_is_held(&swhash->hlist_mutex)); in swevent_hlist_deref()
9882 static void swevent_hlist_release(struct swevent_htable *swhash) in swevent_hlist_release() argument
9884 struct swevent_hlist *hlist = swevent_hlist_deref(swhash); in swevent_hlist_release()
9889 RCU_INIT_POINTER(swhash->swevent_hlist, NULL); in swevent_hlist_release()
9895 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_put_cpu() local
9897 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
9899 if (!--swhash->hlist_refcount) in swevent_hlist_put_cpu()
9900 swevent_hlist_release(swhash); in swevent_hlist_put_cpu()
9902 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_put_cpu()
9915 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in swevent_hlist_get_cpu() local
9918 mutex_lock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
9919 if (!swevent_hlist_deref(swhash) && in swevent_hlist_get_cpu()
9928 rcu_assign_pointer(swhash->swevent_hlist, hlist); in swevent_hlist_get_cpu()
9930 swhash->hlist_refcount++; in swevent_hlist_get_cpu()
9932 mutex_unlock(&swhash->hlist_mutex); in swevent_hlist_get_cpu()
13550 struct swevent_htable *swhash; in perf_event_init_all_cpus() local
13557 swhash = &per_cpu(swevent_htable, cpu); in perf_event_init_all_cpus()
13558 mutex_init(&swhash->hlist_mutex); in perf_event_init_all_cpus()
13577 struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu); in perf_swevent_init_cpu() local
13579 mutex_lock(&swhash->hlist_mutex); in perf_swevent_init_cpu()
13580 if (swhash->hlist_refcount > 0 && !swevent_hlist_deref(swhash)) { in perf_swevent_init_cpu()
13585 rcu_assign_pointer(swhash->swevent_hlist, hlist); in perf_swevent_init_cpu()
13587 mutex_unlock(&swhash->hlist_mutex); in perf_swevent_init_cpu()