Lines Matching full:ri

185 ucf_allocate_pmc(int cpu, int ri, struct pmc *pm,  in ucf_allocate_pmc()  argument
193 PMCDBG2(MDP,ALL,1, "ucf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); in ucf_allocate_pmc()
195 if (ri < 0 || ri > uncore_ucf_npmc) in ucf_allocate_pmc()
206 pm->pm_md.pm_ucf.pm_ucf_ctrl = (flags << (ri * 4)); in ucf_allocate_pmc()
215 ucf_config_pmc(int cpu, int ri, struct pmc *pm) in ucf_config_pmc() argument
220 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_config_pmc()
221 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_config_pmc()
223 PMCDBG3(MDP,CFG,1, "ucf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); in ucf_config_pmc()
228 uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri].phw_pmc = pm; in ucf_config_pmc()
234 ucf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in ucf_describe() argument
238 phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri]; in ucf_describe()
240 snprintf(pi->pm_name, sizeof(pi->pm_name), "UCF-%d", ri); in ucf_describe()
255 ucf_get_config(int cpu, int ri, struct pmc **ppm) in ucf_get_config() argument
257 *ppm = uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri].phw_pmc; in ucf_get_config()
263 ucf_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in ucf_read_pmc() argument
269 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_read_pmc()
270 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_read_pmc()
272 tmp = rdmsr(UCF_CTR0 + ri); in ucf_read_pmc()
279 PMCDBG3(MDP,REA,1, "ucf-read cpu=%d ri=%d -> v=%jx", cpu, ri, *v); in ucf_read_pmc()
285 ucf_release_pmc(int cpu, int ri, struct pmc *pmc) in ucf_release_pmc() argument
287 PMCDBG3(MDP,REL,1, "ucf-release cpu=%d ri=%d pm=%p", cpu, ri, pmc); in ucf_release_pmc()
291 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_release_pmc()
292 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_release_pmc()
294 KASSERT(uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri].phw_pmc == NULL, in ucf_release_pmc()
301 ucf_start_pmc(int cpu, int ri, struct pmc *pm) in ucf_start_pmc() argument
307 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_start_pmc()
308 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_start_pmc()
310 PMCDBG2(MDP,STA,1,"ucf-start cpu=%d ri=%d", cpu, ri); in ucf_start_pmc()
317 ucfc->pc_globalctrl |= (1ULL << (ri + SELECTOFF(uncore_cputype))); in ucf_start_pmc()
328 ucf_stop_pmc(int cpu, int ri, struct pmc *pm __unused) in ucf_stop_pmc() argument
333 PMCDBG2(MDP,STO,1,"ucf-stop cpu=%d ri=%d", cpu, ri); in ucf_stop_pmc()
339 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_stop_pmc()
340 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_stop_pmc()
342 fc = (UCF_MASK << (ri * 4)); in ucf_stop_pmc()
359 ucf_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in ucf_write_pmc() argument
365 KASSERT(ri >= 0 && ri < uncore_ucf_npmc, in ucf_write_pmc()
366 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucf_write_pmc()
374 wrmsr(UCF_CTR0 + ri, v); in ucf_write_pmc()
377 PMCDBG4(MDP,WRI,1, "ucf-write cpu=%d ri=%d v=%jx ucfctrl=%jx ", in ucf_write_pmc()
378 cpu, ri, v, (uintmax_t) rdmsr(UCF_CTRL)); in ucf_write_pmc()
468 ucp_event_sb_hw_ok_on_counter(uint8_t ev, int ri) in ucp_event_sb_hw_ok_on_counter() argument
485 return (mask & (1 << ri)); in ucp_event_sb_hw_ok_on_counter()
489 ucp_allocate_pmc(int cpu, int ri, struct pmc *pm, in ucp_allocate_pmc() argument
497 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_allocate_pmc()
498 ("[uncore,%d] illegal row-index value %d", __LINE__, ri)); in ucp_allocate_pmc()
511 if (ucp_event_sb_hw_ok_on_counter(ev, ri) == 0) in ucp_allocate_pmc()
524 ucp_config_pmc(int cpu, int ri, struct pmc *pm) in ucp_config_pmc() argument
529 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_config_pmc()
530 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucp_config_pmc()
532 PMCDBG3(MDP,CFG,1, "ucp-config cpu=%d ri=%d pm=%p", cpu, ri, pm); in ucp_config_pmc()
537 uncore_pcpu[cpu]->pc_uncorepmcs[ri].phw_pmc = pm; in ucp_config_pmc()
543 ucp_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in ucp_describe() argument
547 phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri]; in ucp_describe()
549 snprintf(pi->pm_name, sizeof(pi->pm_name), "UCP-%d", ri); in ucp_describe()
564 ucp_get_config(int cpu, int ri, struct pmc **ppm) in ucp_get_config() argument
566 *ppm = uncore_pcpu[cpu]->pc_uncorepmcs[ri].phw_pmc; in ucp_get_config()
572 ucp_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in ucp_read_pmc() argument
578 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_read_pmc()
579 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucp_read_pmc()
581 tmp = rdmsr(UCP_PMC0 + ri); in ucp_read_pmc()
587 PMCDBG4(MDP,REA,1, "ucp-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, in ucp_read_pmc()
588 ri, *v); in ucp_read_pmc()
594 ucp_release_pmc(int cpu, int ri, struct pmc *pm) in ucp_release_pmc() argument
598 PMCDBG3(MDP,REL,1, "ucp-release cpu=%d ri=%d pm=%p", cpu, ri, in ucp_release_pmc()
603 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_release_pmc()
604 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucp_release_pmc()
606 KASSERT(uncore_pcpu[cpu]->pc_uncorepmcs[ri].phw_pmc in ucp_release_pmc()
613 ucp_start_pmc(int cpu, int ri, struct pmc *pm) in ucp_start_pmc() argument
620 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_start_pmc()
621 ("[uncore,%d] illegal row-index %d", __LINE__, ri)); in ucp_start_pmc()
625 PMCDBG2(MDP,STA,1, "ucp-start cpu=%d ri=%d", cpu, ri); in ucp_start_pmc()
630 "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", in ucp_start_pmc()
631 cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); in ucp_start_pmc()
633 wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); in ucp_start_pmc()
635 cc->pc_globalctrl |= (1ULL << ri); in ucp_start_pmc()
642 ucp_stop_pmc(int cpu, int ri, struct pmc *pm __unused) in ucp_stop_pmc() argument
647 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_stop_pmc()
648 ("[uncore,%d] illegal row index %d", __LINE__, ri)); in ucp_stop_pmc()
650 PMCDBG2(MDP,STO,1, "ucp-stop cpu=%d ri=%d", cpu, ri); in ucp_stop_pmc()
653 wrmsr(SELECTSEL(uncore_cputype) + ri, 0); in ucp_stop_pmc()
661 ucp_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in ucp_write_pmc() argument
666 KASSERT(ri >= 0 && ri < uncore_ucp_npmc, in ucp_write_pmc()
667 ("[uncore,%d] illegal row index %d", __LINE__, ri)); in ucp_write_pmc()
669 PMCDBG4(MDP,WRI,1, "ucp-write cpu=%d ri=%d msr=0x%x v=%jx", cpu, ri, in ucp_write_pmc()
670 UCP_PMC0 + ri, v); in ucp_write_pmc()
680 wrmsr(UCP_PMC0 + ri, v); in ucp_write_pmc()