Lines Matching refs:ppmu

66 static struct power_pmu *ppmu;  variable
142 if (!ppmu) in is_sier_available()
145 if (ppmu->flags & PPMU_HAS_SIER) in is_sier_available()
185 if ((ppmu->flags & PPMU_HAS_SSLOT) && (mmcra & MMCRA_SAMPLE_ENABLE)) { in perf_ip_adjust()
207 if (ppmu->flags & PPMU_HAS_SIER) in perf_get_data_addr()
212 if (ppmu->flags & PPMU_SIAR_VALID) in perf_get_data_addr()
214 else if (ppmu->flags & PPMU_ALT_SIPR) in perf_get_data_addr()
216 else if (ppmu->flags & PPMU_NO_SIAR) in perf_get_data_addr()
235 if (ppmu->flags & PPMU_HAS_SIER) in regs_sihv()
238 if (ppmu->flags & PPMU_ALT_SIPR) in regs_sihv()
248 if (ppmu->flags & PPMU_HAS_SIER) in regs_sipr()
251 if (ppmu->flags & PPMU_ALT_SIPR) in regs_sipr()
281 if (marked && (ppmu->flags & PPMU_P10_DD1)) { in perf_get_misc_flags()
300 if (ppmu->flags & PPMU_NO_SIPR) { in perf_get_misc_flags()
332 if (ppmu->flags & PPMU_HAS_SIER) in perf_read_regs()
361 else if ((ppmu->flags & PPMU_NO_SIAR)) in perf_read_regs()
365 else if ((ppmu->flags & PPMU_NO_CONT_SAMPLING)) in perf_read_regs()
369 else if (!(ppmu->flags & PPMU_NO_SIPR) && regs_sipr(regs)) in perf_read_regs()
395 if (ppmu->flags & PPMU_P10_DD1) in siar_valid()
397 else if (ppmu->flags & PPMU_HAS_SIER) in siar_valid()
400 if (ppmu->flags & PPMU_SIAR_VALID) in siar_valid()
418 if (!ppmu->bhrb_nr) in power_pmu_bhrb_enable()
434 if (!ppmu->bhrb_nr) in power_pmu_bhrb_disable()
456 if (!ppmu->bhrb_nr) in power_pmu_sched_task()
498 while (r_index < ppmu->bhrb_nr) { in power_pmu_bhrb_read()
520 if (!(ppmu->flags & PPMU_ARCH_31) && in power_pmu_bhrb_read()
585 return (ppmu->flags & PPMU_ARCH_207S) && in is_ebb_event()
640 if (ppmu->flags & PPMU_ARCH_31) { in ebb_switch_out()
685 if (ppmu->flags & PPMU_ARCH_31) { in ebb_switch_in()
801 if (!ppmu) in power_pmu_wants_prompt_pmi()
909 if (!ppmu) { in perf_event_print_debug()
914 if (!ppmu->n_counter) in perf_event_print_debug()
920 smp_processor_id(), ppmu->name, ppmu->n_counter); in perf_event_print_debug()
922 for (i = 0; i < ppmu->n_counter; i++) in perf_event_print_debug()
931 if (ppmu->n_counter > 4) in perf_event_print_debug()
942 if (ppmu->flags & PPMU_HAS_SIER) in perf_event_print_debug()
945 if (ppmu->flags & PPMU_ARCH_207S) { in perf_event_print_debug()
952 if (ppmu->flags & PPMU_ARCH_31) { in perf_event_print_debug()
977 unsigned long addf = ppmu->add_fields; in power_check_constraints()
978 unsigned long tadd = ppmu->test_adder; in power_check_constraints()
979 unsigned long grp_mask = ppmu->group_constraint_mask; in power_check_constraints()
980 unsigned long grp_val = ppmu->group_constraint_val; in power_check_constraints()
982 if (n_ev > ppmu->n_counter) in power_check_constraints()
988 && !ppmu->limited_pmc_event(event_id[i])) { in power_check_constraints()
989 ppmu->get_alternatives(event_id[i], cflags[i], in power_check_constraints()
993 if (ppmu->get_constraint(event_id[i], &cpuhw->amasks[i][0], in power_check_constraints()
1020 if (!ppmu->get_alternatives) in power_check_constraints()
1024 n_alt[i] = ppmu->get_alternatives(event_id[i], cflags[i], in power_check_constraints()
1027 ppmu->get_constraint(cpuhw->alternatives[i][j], in power_check_constraints()
1104 if (ppmu->flags & PPMU_ARCH_207S) in check_excludes()
1213 return (ppmu->flags & PPMU_LIMITED_PMC5_6) in is_limited_pmc()
1310 if (!ppmu) in power_pmu_disable()
1334 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_disable()
1378 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_disable()
1403 if (ppmu->flags & PPMU_ARCH_207S) { in power_pmu_disable()
1431 if (!ppmu) in power_pmu_enable()
1471 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1481 if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_events, hwc_index, in power_pmu_enable()
1482 &cpuhw->mmcr, cpuhw->event, ppmu->flags)) { in power_pmu_enable()
1488 if (!(ppmu->flags & PPMU_ARCH_207S)) { in power_pmu_enable()
1513 if (ppmu->flags & PPMU_ARCH_207S) in power_pmu_enable()
1516 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1577 ppmu->config_bhrb(cpuhw->bhrb_filter); in power_pmu_enable()
1643 if (n0 >= ppmu->n_counter) in power_pmu_add()
1685 if (ppmu->bhrb_filter_map) in power_pmu_add()
1686 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_add()
1723 ppmu->disable_pmc(event->hw.idx - 1, &cpuhw->mmcr); in power_pmu_del()
1866 if (!ppmu) in power_pmu_commit_txn()
1911 if (ppmu->limited_pmc_event(ev)) in can_go_on_limited_pmc()
1918 if (!ppmu->get_alternatives) in can_go_on_limited_pmc()
1922 n = ppmu->get_alternatives(ev, flags, alt); in can_go_on_limited_pmc()
1938 n = ppmu->get_alternatives(ev, flags, alt); in normal_pmc_alternative()
1970 if (!ppmu->cache_events) in hw_perf_cache_event()
1983 ev = (*ppmu->cache_events)[type][op][result]; in hw_perf_cache_event()
1996 for (i=0; i < ppmu->n_blacklist_ev; i++) { in is_event_blacklisted()
1997 if (ppmu->blacklist_ev[i] == ev) in is_event_blacklisted()
2015 if (!ppmu) in power_pmu_event_init()
2020 if (!(ppmu->flags & PPMU_ARCH_207S)) in power_pmu_event_init()
2027 if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) in power_pmu_event_init()
2030 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2032 ev = ppmu->generic_events[ev]; in power_pmu_event_init()
2039 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2045 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2059 if (ppmu->check_attr_config && in power_pmu_event_init()
2060 ppmu->check_attr_config(event)) in power_pmu_event_init()
2088 if (ppmu->flags & PPMU_LIMITED_PMC5_6) { in power_pmu_event_init()
2091 } else if (ppmu->limited_pmc_event(ev)) { in power_pmu_event_init()
2115 n = collect_events(event->group_leader, ppmu->n_counter - 1, in power_pmu_event_init()
2151 if (ppmu->bhrb_filter_map) in power_pmu_event_init()
2152 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_event_init()
2321 ppmu->get_mem_data_src) { in record_and_restart()
2322 ppmu->get_mem_data_src(&data.data_src, ppmu->flags, regs); in record_and_restart()
2327 ppmu->get_mem_weight) { in record_and_restart()
2328 ppmu->get_mem_weight(&data.weight.full, event->attr.sample_type); in record_and_restart()
2412 for (i = 0; i < ppmu->n_counter; ++i) in __perf_event_interrupt()
2417 for (i = 0; i < ppmu->n_counter; ++i) { in __perf_event_interrupt()
2500 if (ppmu) { in power_pmu_prepare_cpu()
2511 if (ppmu) in pmu_name_show()
2512 return sysfs_emit(buf, "%s", ppmu->name); in pmu_name_show()
2536 if (ppmu) in register_power_pmu()
2539 ppmu = pmu; in register_power_pmu()
2543 power_pmu.attr_groups = ppmu->attr_groups; in register_power_pmu()
2545 if (ppmu->flags & PPMU_ARCH_207S) in register_power_pmu()
2548 power_pmu.capabilities |= (ppmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS); in register_power_pmu()