Lines Matching refs:ctr_idx
160 int ctr_idx = -1; in kvm_pmu_get_programmable_pmc_index() local
178 ctr_idx = pmc_idx; in kvm_pmu_get_programmable_pmc_index()
183 return ctr_idx; in kvm_pmu_get_programmable_pmc_index()
461 int ctr_idx, ret, sbiret = 0; in kvm_riscv_vcpu_pmu_ctr_cfg_match() local
503 ctr_idx = ctr_base + __ffs(ctr_mask); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
505 ctr_idx = pmu_get_pmc_index(kvpmu, eidx, ctr_base, ctr_mask); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
506 if (ctr_idx < 0) { in kvm_riscv_vcpu_pmu_ctr_cfg_match()
512 pmc = &kvpmu->pmc[ctr_idx]; in kvm_riscv_vcpu_pmu_ctr_cfg_match()
513 pmc->idx = ctr_idx; in kvm_riscv_vcpu_pmu_ctr_cfg_match()
524 set_bit(ctr_idx, kvpmu->pmc_in_use); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
526 retdata->out_val = ctr_idx; in kvm_riscv_vcpu_pmu_ctr_cfg_match()