Lines Matching refs:pm
222 iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, in iaf_allocate_pmc() argument
233 PMCDBG2(MDP,ALL,1, "iaf-allocate ri=%d reqcaps=0x%x", ri, pm->pm_caps); in iaf_allocate_pmc()
303 pm->pm_md.pm_iaf.pm_iaf_ctrl = (flags << (ri * 4)); in iaf_allocate_pmc()
306 (uintmax_t) pm->pm_md.pm_iaf.pm_iaf_ctrl); in iaf_allocate_pmc()
312 iaf_config_pmc(int cpu, int ri, struct pmc *pm) in iaf_config_pmc() argument
320 PMCDBG3(MDP,CFG,1, "iaf-config cpu=%d ri=%d pm=%p", cpu, ri, pm); in iaf_config_pmc()
325 core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri].phw_pmc = pm; in iaf_config_pmc()
371 iaf_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in iaf_read_pmc() argument
382 if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in iaf_read_pmc()
417 iaf_start_pmc(int cpu, int ri, struct pmc *pm) in iaf_start_pmc() argument
429 cc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; in iaf_start_pmc()
443 iaf_stop_pmc(int cpu, int ri, struct pmc *pm) in iaf_stop_pmc() argument
469 iaf_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in iaf_write_pmc() argument
480 if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in iaf_write_pmc()
712 iap_allocate_pmc(int cpu, int ri, struct pmc *pm, in iap_allocate_pmc() argument
773 pm->pm_md.pm_iap.pm_iap_evsel = iap->pm_iap_config; in iap_allocate_pmc()
778 iap_config_pmc(int cpu, int ri, struct pmc *pm) in iap_config_pmc() argument
786 PMCDBG3(MDP,CFG,1, "iap-config cpu=%d ri=%d pm=%p", cpu, ri, pm); in iap_config_pmc()
791 core_pcpu[cpu]->pc_corepmcs[ri].phw_pmc = pm; in iap_config_pmc()
837 iap_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in iap_read_pmc() argument
847 if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in iap_read_pmc()
859 iap_release_pmc(int cpu, int ri, struct pmc *pm) in iap_release_pmc() argument
861 (void) pm; in iap_release_pmc()
864 pm); in iap_release_pmc()
878 iap_start_pmc(int cpu, int ri, struct pmc *pm) in iap_start_pmc() argument
892 evsel = pm->pm_md.pm_iap.pm_iap_evsel; in iap_start_pmc()
901 wrmsr(IA_OFFCORE_RSP0, pm->pm_md.pm_iap.pm_iap_rsp); in iap_start_pmc()
904 wrmsr(IA_OFFCORE_RSP1, pm->pm_md.pm_iap.pm_iap_rsp); in iap_start_pmc()
921 iap_stop_pmc(int cpu, int ri, struct pmc *pm __unused) in iap_stop_pmc()
939 iap_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) in iap_write_pmc() argument
947 if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in iap_write_pmc()
1006 struct pmc *pm; in core_intr() local
1018 if ((pm = cc->pc_corepmcs[ri].phw_pmc) == NULL || in core_intr()
1019 !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in core_intr()
1027 if (pm->pm_state != PMC_STATE_RUNNING) in core_intr()
1030 error = pmc_process_interrupt(PMC_HR, pm, tf); in core_intr()
1032 v = pm->pm_sc.pm_reloadcount; in core_intr()
1039 wrmsr(IAP_EVSEL0 + ri, pm->pm_md.pm_iap.pm_iap_evsel); in core_intr()
1045 wrmsr(IAP_EVSEL0 + ri, pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN); in core_intr()
1064 struct pmc *pm; in core2_intr() local
1102 pm = cc->pc_corepmcs[n + core_iaf_ri].phw_pmc; in core2_intr()
1103 if (pm == NULL || pm->pm_state != PMC_STATE_RUNNING || in core2_intr()
1104 !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in core2_intr()
1107 error = pmc_process_interrupt(PMC_HR, pm, tf); in core2_intr()
1111 v = iaf_reload_count_to_perfctr_value(pm->pm_sc.pm_reloadcount); in core2_intr()
1129 pm = cc->pc_corepmcs[n].phw_pmc; in core2_intr()
1130 if (pm == NULL || pm->pm_state != PMC_STATE_RUNNING || in core2_intr()
1131 !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) in core2_intr()
1134 error = pmc_process_interrupt(PMC_HR, pm, tf); in core2_intr()
1138 v = iap_reload_count_to_perfctr_value(pm->pm_sc.pm_reloadcount); in core2_intr()