Lines Matching full:pm

141 cmn600_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v)  in cmn600_read_pmc()  argument
155 nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; in cmn600_read_pmc()
156 local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; in cmn600_read_pmc()
168 cmn600_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in cmn600_write_pmc() argument
182 nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; in cmn600_write_pmc()
183 local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; in cmn600_write_pmc()
185 KASSERT(pm != NULL, in cmn600_write_pmc()
197 * pmc 'pm'.
200 cmn600_config_pmc(int cpu, int ri, struct pmc *pm) in cmn600_config_pmc() argument
204 PMCDBG4(MDP, CFG, 1, "%s cpu=%d ri=%d pm=%p", __func__, cpu, ri, pm); in cmn600_config_pmc()
213 KASSERT(pm == NULL || phw->phw_pmc == NULL, in cmn600_config_pmc()
214 ("[cmn600,%d] pm=%p phw->pm=%p hwpmc not unconfigured", in cmn600_config_pmc()
215 __LINE__, pm, phw->phw_pmc)); in cmn600_config_pmc()
217 phw->phw_pmc = pm; in cmn600_config_pmc()
313 cmn600_allocate_pmc(int cpu, int ri, struct pmc *pm, in cmn600_allocate_pmc() argument
342 caps = pm->pm_caps; in cmn600_allocate_pmc()
355 pm->pm_md.pm_cmn600.pm_cmn600_config = in cmn600_allocate_pmc()
357 pm->pm_md.pm_cmn600.pm_cmn600_occupancy = in cmn600_allocate_pmc()
359 desc->pd_nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid = in cmn600_allocate_pmc()
361 desc->pd_node_type = pm->pm_md.pm_cmn600.pm_cmn600_node_type = in cmn600_allocate_pmc()
363 pm->pm_md.pm_cmn600.pm_cmn600_event = e; in cmn600_allocate_pmc()
364 desc->pd_local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter = in cmn600_allocate_pmc()
377 struct pmc *pm __diagused; in cmn600_release_pmc()
389 pm = phw->phw_pmc; in cmn600_release_pmc()
395 KASSERT(pm == NULL, ("[cmn600,%d] PHW pmc %p non-NULL", __LINE__, pm)); in cmn600_release_pmc()
416 cmn600_start_pmc(int cpu, int ri, struct pmc *pm) in cmn600_start_pmc() argument
436 config = pm->pm_md.pm_cmn600.pm_cmn600_config; in cmn600_start_pmc()
437 occupancy = pm->pm_md.pm_cmn600.pm_cmn600_occupancy; in cmn600_start_pmc()
438 node_type = pm->pm_md.pm_cmn600.pm_cmn600_node_type; in cmn600_start_pmc()
439 event = pm->pm_md.pm_cmn600.pm_cmn600_event; in cmn600_start_pmc()
440 nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; in cmn600_start_pmc()
441 local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; in cmn600_start_pmc()
525 cmn600_stop_pmc(int cpu, int ri, struct pmc *pm) in cmn600_stop_pmc() argument
541 local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; in cmn600_stop_pmc()
542 pmu_cmn600_clr8(desc->pd_rw_arg, pm->pm_md.pm_cmn600.pm_cmn600_nodeid, in cmn600_stop_pmc()
547 pm->pm_md.pm_cmn600.pm_cmn600_nodeid, NODE_TYPE_XP, in cmn600_stop_pmc()
551 pm->pm_md.pm_cmn600.pm_cmn600_nodeid, NODE_TYPE_XP, in cmn600_stop_pmc()
645 struct pmc *pm; in cmn600_pmu_intr() local
657 pm = phw->phw_pmc; in cmn600_pmu_intr()
658 if (pm == NULL) in cmn600_pmu_intr()
661 if (!PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { in cmn600_pmu_intr()
663 pm->pm_pcpu_state[0].pps_overflowcnt += 1; in cmn600_pmu_intr()
667 if (pm->pm_state != PMC_STATE_RUNNING) in cmn600_pmu_intr()
670 error = pmc_process_interrupt(PMC_HR, pm, tf); in cmn600_pmu_intr()
672 cmn600_stop_pmc(cpu, ri, pm); in cmn600_pmu_intr()
675 cmn600_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); in cmn600_pmu_intr()