Lines Matching full:pm

181 powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm,  in powerpc_allocate_pmc()  argument
223 pm->pm_md.pm_powerpc.pm_powerpc_evsel = config; in powerpc_allocate_pmc()
248 powerpc_start_pmc(int cpu, int ri, struct pmc *pm) in powerpc_start_pmc() argument
252 powerpc_set_pmc(cpu, ri, pm->pm_md.pm_powerpc.pm_powerpc_evsel); in powerpc_start_pmc()
258 powerpc_stop_pmc(int cpu, int ri, struct pmc *pm __unused) in powerpc_stop_pmc()
266 powerpc_config_pmc(int cpu, int ri, struct pmc *pm) in powerpc_config_pmc() argument
270 PMCDBG3(MDP,CFG,1, "powerpc-config cpu=%d ri=%d pm=%p", cpu, ri, pm); in powerpc_config_pmc()
279 KASSERT(pm == NULL || phw->phw_pmc == NULL, in powerpc_config_pmc()
280 ("[powerpc,%d] pm=%p phw->pm=%p hwpmc not unconfigured", in powerpc_config_pmc()
281 __LINE__, pm, phw->phw_pmc)); in powerpc_config_pmc()
283 phw->phw_pmc = pm; in powerpc_config_pmc()
361 powerpc_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in powerpc_read_pmc() argument
379 r = pm->pm_sc.pm_reloadcount; in powerpc_read_pmc()
381 if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { in powerpc_read_pmc()
398 tmp = p + (POWERPC_MAX_PMC_VALUE + 1) * PPC_OVERFLOWCNT(pm); in powerpc_read_pmc()
401 cpu, ri, (uintmax_t)tmp, (uintmax_t)PPC_OVERFLOWCNT(pm), in powerpc_read_pmc()
408 powerpc_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in powerpc_write_pmc() argument
417 if (PMC_IS_COUNTING_MODE(PMC_TO_MODE(pm))) { in powerpc_write_pmc()
418 PPC_OVERFLOWCNT(pm) = v / (POWERPC_MAX_PMC_VALUE + 1); in powerpc_write_pmc()
429 cpu, ri, (uintmax_t)v, (uintmax_t)PPC_OVERFLOWCNT(pm), in powerpc_write_pmc()
439 struct pmc *pm; in powerpc_pmc_intr() local
464 * If pm is available and in sampling mode, use reload in powerpc_pmc_intr()
468 if ((pm = pc->pc_ppcpmcs[i].phw_pmc) != NULL && in powerpc_pmc_intr()
469 PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { in powerpc_pmc_intr()
470 if (pm->pm_state != PMC_STATE_RUNNING) { in powerpc_pmc_intr()
471 powerpc_write_pmc(cpu, i, pm, in powerpc_pmc_intr()
472 pm->pm_sc.pm_reloadcount); in powerpc_pmc_intr()
476 if (pm != NULL) { /* !PMC_IS_SAMPLING_MODE */ in powerpc_pmc_intr()
477 PPC_OVERFLOWCNT(pm) = (PPC_OVERFLOWCNT(pm) + in powerpc_pmc_intr()
481 cpu, i, PPC_OVERFLOWCNT(pm)); in powerpc_pmc_intr()
488 error = pmc_process_interrupt(PMC_HR, pm, tf); in powerpc_pmc_intr()
493 powerpc_stop_pmc(cpu, i, pm); in powerpc_pmc_intr()
497 powerpc_write_pmc(cpu, i, pm, pm->pm_sc.pm_reloadcount); in powerpc_pmc_intr()