Lines Matching refs:ref
361 struct imc_pmu_ref *ref;
412 ref = get_nest_pmu_ref(cpu);
413 if (!ref)
416 ref->refc = 0;
462 struct imc_pmu_ref *ref;
475 ref = get_nest_pmu_ref(event->cpu);
476 if (!ref)
480 spin_lock(&ref->lock);
481 if (ref->refc == 0) {
487 * function set the ref->count to zero, if the cpu which is
492 spin_unlock(&ref->lock);
495 ref->refc--;
496 if (ref->refc == 0) {
500 spin_unlock(&ref->lock);
504 } else if (ref->refc < 0) {
506 ref->refc = 0;
508 spin_unlock(&ref->lock);
517 struct imc_pmu_ref *ref;
569 ref = get_nest_pmu_ref(event->cpu);
570 if (!ref)
573 spin_lock(&ref->lock);
574 if (ref->refc == 0) {
578 spin_unlock(&ref->lock);
584 ++ref->refc;
585 spin_unlock(&ref->lock);
677 struct imc_pmu_ref *ref;
717 ref = &core_imc_refc[core_id];
718 if (!ref)
721 ref->refc = 0;
764 struct imc_pmu_ref *ref;
777 ref = &core_imc_refc[core_id];
778 if (!ref)
781 spin_lock(&ref->lock);
782 if (ref->refc == 0) {
788 * function set the ref->count to zero, if the cpu which is
793 spin_unlock(&ref->lock);
796 ref->refc--;
797 if (ref->refc == 0) {
801 spin_unlock(&ref->lock);
805 } else if (ref->refc < 0) {
807 ref->refc = 0;
809 spin_unlock(&ref->lock);
820 struct imc_pmu_ref *ref;
847 ref = &core_imc_refc[core_id];
848 if (!ref)
857 spin_lock(&ref->lock);
858 if (ref->refc == 0) {
862 spin_unlock(&ref->lock);
868 ++ref->refc;
869 spin_unlock(&ref->lock);
1125 struct imc_pmu_ref *ref;
1142 * If not, just increment the count in ref count struct.
1144 ref = &core_imc_refc[core_id];
1145 if (!ref)
1148 spin_lock(&ref->lock);
1149 if (ref->refc == 0) {
1152 spin_unlock(&ref->lock);
1158 ++ref->refc;
1159 spin_unlock(&ref->lock);
1167 struct imc_pmu_ref *ref;
1170 ref = &core_imc_refc[core_id];
1171 if (!ref) {
1176 spin_lock(&ref->lock);
1177 ref->refc--;
1178 if (ref->refc == 0) {
1181 spin_unlock(&ref->lock);
1186 } else if (ref->refc < 0) {
1187 ref->refc = 0;
1189 spin_unlock(&ref->lock);
1360 struct imc_pmu_ref *ref = NULL;
1369 ref = &trace_imc_refc[core_id];
1370 if (!ref) {
1376 spin_lock(&ref->lock);
1377 if (ref->refc == 0) {
1380 spin_unlock(&ref->lock);
1385 ++ref->refc;
1386 spin_unlock(&ref->lock);
1410 struct imc_pmu_ref *ref = NULL;
1413 ref = &trace_imc_refc[core_id];
1414 if (!ref) {
1419 spin_lock(&ref->lock);
1420 ref->refc--;
1421 if (ref->refc == 0) {
1424 spin_unlock(&ref->lock);
1428 } else if (ref->refc < 0) {
1429 ref->refc = 0;
1431 spin_unlock(&ref->lock);