• Home
  • Raw
  • Download

Lines Matching refs:ref

354 	struct imc_pmu_ref *ref;  in ppc_nest_imc_cpu_offline()  local
405 ref = get_nest_pmu_ref(cpu); in ppc_nest_imc_cpu_offline()
406 if (!ref) in ppc_nest_imc_cpu_offline()
409 ref->refc = 0; in ppc_nest_imc_cpu_offline()
455 struct imc_pmu_ref *ref; in nest_imc_counters_release() local
468 ref = get_nest_pmu_ref(event->cpu); in nest_imc_counters_release()
469 if (!ref) in nest_imc_counters_release()
473 spin_lock(&ref->lock); in nest_imc_counters_release()
474 if (ref->refc == 0) { in nest_imc_counters_release()
485 spin_unlock(&ref->lock); in nest_imc_counters_release()
488 ref->refc--; in nest_imc_counters_release()
489 if (ref->refc == 0) { in nest_imc_counters_release()
493 spin_unlock(&ref->lock); in nest_imc_counters_release()
497 } else if (ref->refc < 0) { in nest_imc_counters_release()
499 ref->refc = 0; in nest_imc_counters_release()
501 spin_unlock(&ref->lock); in nest_imc_counters_release()
510 struct imc_pmu_ref *ref; in nest_imc_event_init() local
562 ref = get_nest_pmu_ref(event->cpu); in nest_imc_event_init()
563 if (!ref) in nest_imc_event_init()
566 spin_lock(&ref->lock); in nest_imc_event_init()
567 if (ref->refc == 0) { in nest_imc_event_init()
571 spin_unlock(&ref->lock); in nest_imc_event_init()
577 ++ref->refc; in nest_imc_event_init()
578 spin_unlock(&ref->lock); in nest_imc_event_init()
670 struct imc_pmu_ref *ref; in ppc_core_imc_cpu_offline() local
710 ref = &core_imc_refc[core_id]; in ppc_core_imc_cpu_offline()
711 if (!ref) in ppc_core_imc_cpu_offline()
714 ref->refc = 0; in ppc_core_imc_cpu_offline()
757 struct imc_pmu_ref *ref; in core_imc_counters_release() local
770 ref = &core_imc_refc[core_id]; in core_imc_counters_release()
771 if (!ref) in core_imc_counters_release()
774 spin_lock(&ref->lock); in core_imc_counters_release()
775 if (ref->refc == 0) { in core_imc_counters_release()
786 spin_unlock(&ref->lock); in core_imc_counters_release()
789 ref->refc--; in core_imc_counters_release()
790 if (ref->refc == 0) { in core_imc_counters_release()
794 spin_unlock(&ref->lock); in core_imc_counters_release()
798 } else if (ref->refc < 0) { in core_imc_counters_release()
800 ref->refc = 0; in core_imc_counters_release()
802 spin_unlock(&ref->lock); in core_imc_counters_release()
813 struct imc_pmu_ref *ref; in core_imc_event_init() local
840 ref = &core_imc_refc[core_id]; in core_imc_event_init()
841 if (!ref) in core_imc_event_init()
850 spin_lock(&ref->lock); in core_imc_event_init()
851 if (ref->refc == 0) { in core_imc_event_init()
855 spin_unlock(&ref->lock); in core_imc_event_init()
861 ++ref->refc; in core_imc_event_init()
862 spin_unlock(&ref->lock); in core_imc_event_init()
1118 struct imc_pmu_ref *ref; in thread_imc_event_add() local
1137 ref = &core_imc_refc[core_id]; in thread_imc_event_add()
1138 if (!ref) in thread_imc_event_add()
1141 spin_lock(&ref->lock); in thread_imc_event_add()
1142 if (ref->refc == 0) { in thread_imc_event_add()
1145 spin_unlock(&ref->lock); in thread_imc_event_add()
1151 ++ref->refc; in thread_imc_event_add()
1152 spin_unlock(&ref->lock); in thread_imc_event_add()
1160 struct imc_pmu_ref *ref; in thread_imc_event_del() local
1163 ref = &core_imc_refc[core_id]; in thread_imc_event_del()
1164 if (!ref) { in thread_imc_event_del()
1169 spin_lock(&ref->lock); in thread_imc_event_del()
1170 ref->refc--; in thread_imc_event_del()
1171 if (ref->refc == 0) { in thread_imc_event_del()
1174 spin_unlock(&ref->lock); in thread_imc_event_del()
1179 } else if (ref->refc < 0) { in thread_imc_event_del()
1180 ref->refc = 0; in thread_imc_event_del()
1182 spin_unlock(&ref->lock); in thread_imc_event_del()
1353 struct imc_pmu_ref *ref = NULL; in trace_imc_event_add() local
1362 ref = &trace_imc_refc[core_id]; in trace_imc_event_add()
1363 if (!ref) { in trace_imc_event_add()
1369 spin_lock(&ref->lock); in trace_imc_event_add()
1370 if (ref->refc == 0) { in trace_imc_event_add()
1373 spin_unlock(&ref->lock); in trace_imc_event_add()
1378 ++ref->refc; in trace_imc_event_add()
1379 spin_unlock(&ref->lock); in trace_imc_event_add()
1403 struct imc_pmu_ref *ref = NULL; in trace_imc_event_del() local
1406 ref = &trace_imc_refc[core_id]; in trace_imc_event_del()
1407 if (!ref) { in trace_imc_event_del()
1412 spin_lock(&ref->lock); in trace_imc_event_del()
1413 ref->refc--; in trace_imc_event_del()
1414 if (ref->refc == 0) { in trace_imc_event_del()
1417 spin_unlock(&ref->lock); in trace_imc_event_del()
1421 } else if (ref->refc < 0) { in trace_imc_event_del()
1422 ref->refc = 0; in trace_imc_event_del()
1424 spin_unlock(&ref->lock); in trace_imc_event_del()