Lines Matching full:ri

164 arm64_allocate_pmc(int cpu, int ri, struct pmc *pm,
172 KASSERT(ri >= 0 && ri < arm64_npmcs,
173 ("[arm64,%d] illegal row index %d", __LINE__, ri));
217 PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%lx", ri,
225 arm64_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v)
233 KASSERT(ri >= 0 && ri < arm64_npmcs,
234 ("[arm64,%d] illegal row index %d", __LINE__, ri));
240 tmp = arm64_pmcn_read(ri);
241 reg = (1 << ri);
248 tmp = arm64_pmcn_read(ri);
253 PMCDBG2(MDP, REA, 2, "arm64-read id=%d -> %jd", ri, tmp);
271 arm64_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v)
276 KASSERT(ri >= 0 && ri < arm64_npmcs,
277 ("[arm64,%d] illegal row-index %d", __LINE__, ri));
282 PMCDBG3(MDP, WRI, 1, "arm64-write cpu=%d ri=%d v=%jx", cpu, ri, v);
285 arm64_pmcn_write(ri, v);
291 arm64_config_pmc(int cpu, int ri, struct pmc *pm)
295 PMCDBG3(MDP, CFG, 1, "cpu=%d ri=%d pm=%p", cpu, ri, pm);
299 KASSERT(ri >= 0 && ri < arm64_npmcs,
300 ("[arm64,%d] illegal row-index %d", __LINE__, ri));
302 phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri];
314 arm64_start_pmc(int cpu, int ri, struct pmc *pm)
323 WRITE_SPECIALREG(pmselr_el0, ri);
331 arm64_interrupt_enable(ri);
332 arm64_counter_enable(ri);
338 arm64_stop_pmc(int cpu, int ri, struct pmc *pm __unused)
343 arm64_counter_disable(ri);
344 arm64_interrupt_disable(ri);
350 arm64_release_pmc(int cpu, int ri, struct pmc *pmc)
356 KASSERT(ri >= 0 && ri < arm64_npmcs,
357 ("[arm64,%d] illegal row-index %d", __LINE__, ri));
359 phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri];
369 int retval, ri;
383 for (ri = 0; ri < arm64_npmcs; ri++) {
384 pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc;
388 reg = (1 << ri);
408 arm64_stop_pmc(cpu, ri, pm);
411 arm64_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount);
418 arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc)
424 KASSERT(ri >= 0 && ri < arm64_npmcs,
425 ("[arm64,%d] row-index %d out of range", __LINE__, ri));
427 phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri];
429 snprintf(pi->pm_name, sizeof(pi->pm_name), "ARMV8-%d", ri);
444 arm64_get_config(int cpu, int ri, struct pmc **ppm)
447 *ppm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc;