Lines Matching refs:ref

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