Lines Matching full:ri

95 soft_allocate_pmc(int cpu, int ri, struct pmc *pm,  in soft_allocate_pmc()  argument
105 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_allocate_pmc()
106 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_allocate_pmc()
134 soft_config_pmc(int cpu, int ri, struct pmc *pm) in soft_config_pmc() argument
138 PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); in soft_config_pmc()
142 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_config_pmc()
143 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_config_pmc()
145 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_config_pmc()
157 soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in soft_describe() argument
164 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_describe()
165 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_describe()
167 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_describe()
168 pd = &soft_pmcdesc[ri]; in soft_describe()
185 soft_get_config(int cpu, int ri, struct pmc **ppm) in soft_get_config() argument
187 (void) ri; in soft_get_config()
191 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_get_config()
192 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_get_config()
194 *ppm = soft_pcpu[cpu]->soft_hw[ri].phw_pmc; in soft_get_config()
201 int ri; in soft_pcpu_fini() local
211 ri = md->pmd_classdep[PMC_CLASS_INDEX_SOFT].pcd_ri; in soft_pcpu_fini()
213 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_pcpu_fini()
214 ("[soft,%d] ri=%d", __LINE__, ri)); in soft_pcpu_fini()
217 pc->pc_hwpmcs[ri] = NULL; in soft_pcpu_fini()
257 soft_read_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t *v) in soft_read_pmc() argument
262 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_read_pmc()
263 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_read_pmc()
265 PMCDBG1(MDP,REA,1,"soft-read id=%d", ri); in soft_read_pmc()
267 *v = soft_pcpu[cpu]->soft_values[ri]; in soft_read_pmc()
273 soft_write_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t v) in soft_write_pmc() argument
277 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_write_pmc()
278 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_write_pmc()
280 PMCDBG3(MDP,WRI,1, "soft-write cpu=%d ri=%d v=%jx", cpu, ri, v); in soft_write_pmc()
282 soft_pcpu[cpu]->soft_values[ri] = v; in soft_write_pmc()
288 soft_release_pmc(int cpu, int ri, struct pmc *pmc) in soft_release_pmc() argument
298 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_release_pmc()
299 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_release_pmc()
301 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_release_pmc()
320 soft_start_pmc(int cpu, int ri, struct pmc *pm) in soft_start_pmc() argument
326 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_start_pmc()
327 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_start_pmc()
339 soft_stop_pmc(int cpu, int ri, struct pmc *pm) in soft_stop_pmc() argument
345 KASSERT(ri >= 0 && ri < SOFT_NPMCS, in soft_stop_pmc()
346 ("[soft,%d] illegal row-index %d", __LINE__, ri)); in soft_stop_pmc()
363 int ri, processed, error, user_mode; in pmc_soft_intr() local
371 for (ri = 0; ri < SOFT_NPMCS; ri++) { in pmc_soft_intr()
373 pm = pc->soft_hw[ri].phw_pmc; in pmc_soft_intr()
382 if ((pc->soft_values[ri]--) <= 0) in pmc_soft_intr()
383 pc->soft_values[ri] += pm->pm_sc.pm_reloadcount; in pmc_soft_intr()
389 soft_stop_pmc(ks->pm_cpu, ri, pm); in pmc_soft_intr()
401 pc->soft_values[ri]++; in pmc_soft_intr()