Lines Matching full:ppmu
66 static struct power_pmu *ppmu; variable
82 * these registers (via mtspr/mfspr) are done under ppmu flag
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 (ppmu->flags & PPMU_NO_SIPR) { in perf_get_misc_flags()
290 if (!(ppmu->flags & PPMU_P10)) in perf_get_misc_flags()
300 if (ppmu->flags & PPMU_P10) { in perf_get_misc_flags()
325 if (ppmu->flags & PPMU_HAS_SIER) in perf_read_regs()
354 else if ((ppmu->flags & PPMU_NO_SIAR)) in perf_read_regs()
358 else if ((ppmu->flags & PPMU_NO_CONT_SAMPLING)) in perf_read_regs()
362 else if (!(ppmu->flags & PPMU_NO_SIPR) && regs_sipr(regs)) in perf_read_regs()
388 if (ppmu->flags & PPMU_P10_DD1) in siar_valid()
390 else if (ppmu->flags & PPMU_HAS_SIER) in siar_valid()
393 if (ppmu->flags & PPMU_SIAR_VALID) in siar_valid()
411 if (!ppmu->bhrb_nr) in power_pmu_bhrb_enable()
427 if (!ppmu->bhrb_nr) in power_pmu_bhrb_disable()
449 if (!ppmu->bhrb_nr) in power_pmu_sched_task()
491 while (r_index < ppmu->bhrb_nr) { in power_pmu_bhrb_read()
513 if (!(ppmu->flags & PPMU_ARCH_31) && in power_pmu_bhrb_read()
578 return (ppmu->flags & PPMU_ARCH_207S) && in is_ebb_event()
633 if (ppmu->flags & PPMU_ARCH_31) { in ebb_switch_out()
678 if (ppmu->flags & PPMU_ARCH_31) { in ebb_switch_in()
794 if (!ppmu) in power_pmu_wants_prompt_pmi()
902 if (!ppmu) { in perf_event_print_debug()
907 if (!ppmu->n_counter) in perf_event_print_debug()
912 pr_info("CPU: %d PMU registers, ppmu = %s n_counters = %d", in perf_event_print_debug()
913 smp_processor_id(), ppmu->name, ppmu->n_counter); in perf_event_print_debug()
915 for (i = 0; i < ppmu->n_counter; i++) in perf_event_print_debug()
924 if (ppmu->n_counter > 4) in perf_event_print_debug()
935 if (ppmu->flags & PPMU_HAS_SIER) in perf_event_print_debug()
938 if (ppmu->flags & PPMU_ARCH_207S) { in perf_event_print_debug()
945 if (ppmu->flags & PPMU_ARCH_31) { in perf_event_print_debug()
970 unsigned long addf = ppmu->add_fields; in power_check_constraints()
971 unsigned long tadd = ppmu->test_adder; in power_check_constraints()
972 unsigned long grp_mask = ppmu->group_constraint_mask; in power_check_constraints()
973 unsigned long grp_val = ppmu->group_constraint_val; in power_check_constraints()
975 if (n_ev > ppmu->n_counter) in power_check_constraints()
981 && !ppmu->limited_pmc_event(event_id[i])) { in power_check_constraints()
982 ppmu->get_alternatives(event_id[i], cflags[i], in power_check_constraints()
986 if (ppmu->get_constraint(event_id[i], &cpuhw->amasks[i][0], in power_check_constraints()
1013 if (!ppmu->get_alternatives) in power_check_constraints()
1017 n_alt[i] = ppmu->get_alternatives(event_id[i], cflags[i], in power_check_constraints()
1020 ppmu->get_constraint(cpuhw->alternatives[i][j], in power_check_constraints()
1097 if (ppmu->flags & PPMU_ARCH_207S) in check_excludes()
1206 return (ppmu->flags & PPMU_LIMITED_PMC5_6) in is_limited_pmc()
1303 if (!ppmu) in power_pmu_disable()
1327 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_disable()
1370 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_disable()
1395 if (ppmu->flags & PPMU_ARCH_207S) { in power_pmu_disable()
1423 if (!ppmu) in power_pmu_enable()
1463 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1473 if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_events, hwc_index, in power_pmu_enable()
1474 &cpuhw->mmcr, cpuhw->event, ppmu->flags)) { in power_pmu_enable()
1480 if (!(ppmu->flags & PPMU_ARCH_207S)) { in power_pmu_enable()
1505 if (ppmu->flags & PPMU_ARCH_207S) in power_pmu_enable()
1508 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1569 ppmu->config_bhrb(cpuhw->bhrb_filter); in power_pmu_enable()
1635 if (n0 >= ppmu->n_counter) in power_pmu_add()
1677 if (ppmu->bhrb_filter_map) in power_pmu_add()
1678 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_add()
1715 ppmu->disable_pmc(event->hw.idx - 1, &cpuhw->mmcr); in power_pmu_del()
1858 if (!ppmu) in power_pmu_commit_txn()
1903 if (ppmu->limited_pmc_event(ev)) in can_go_on_limited_pmc()
1910 if (!ppmu->get_alternatives) in can_go_on_limited_pmc()
1914 n = ppmu->get_alternatives(ev, flags, alt); in can_go_on_limited_pmc()
1930 n = ppmu->get_alternatives(ev, flags, alt); in normal_pmc_alternative()
1962 if (!ppmu->cache_events) in hw_perf_cache_event()
1975 ev = (*ppmu->cache_events)[type][op][result]; in hw_perf_cache_event()
1988 for (i=0; i < ppmu->n_blacklist_ev; i++) { in is_event_blacklisted()
1989 if (ppmu->blacklist_ev[i] == ev) in is_event_blacklisted()
2007 if (!ppmu) in power_pmu_event_init()
2012 if (!(ppmu->flags & PPMU_ARCH_207S)) in power_pmu_event_init()
2019 if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) in power_pmu_event_init()
2022 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2024 ev = ppmu->generic_events[ev]; in power_pmu_event_init()
2031 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2037 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2051 if (ppmu->check_attr_config && in power_pmu_event_init()
2052 ppmu->check_attr_config(event)) in power_pmu_event_init()
2080 if (ppmu->flags & PPMU_LIMITED_PMC5_6) { in power_pmu_event_init()
2083 } else if (ppmu->limited_pmc_event(ev)) { in power_pmu_event_init()
2107 n = collect_events(event->group_leader, ppmu->n_counter - 1, in power_pmu_event_init()
2143 if (ppmu->bhrb_filter_map) in power_pmu_event_init()
2144 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_event_init()
2312 ppmu->get_mem_data_src) { in record_and_restart()
2313 ppmu->get_mem_data_src(&data.data_src, ppmu->flags, regs); in record_and_restart()
2318 ppmu->get_mem_weight) { in record_and_restart()
2319 ppmu->get_mem_weight(&data.weight.full, event->attr.sample_type); in record_and_restart()
2403 for (i = 0; i < ppmu->n_counter; ++i) in __perf_event_interrupt()
2408 for (i = 0; i < ppmu->n_counter; ++i) { in __perf_event_interrupt()
2491 if (ppmu) { in power_pmu_prepare_cpu()
2502 if (ppmu) in pmu_name_show()
2503 return sysfs_emit(buf, "%s", ppmu->name); in pmu_name_show()
2527 if (ppmu) in register_power_pmu()
2530 ppmu = pmu; in register_power_pmu()
2534 power_pmu.attr_groups = ppmu->attr_groups; in register_power_pmu()
2536 if (ppmu->flags & PPMU_ARCH_207S) in register_power_pmu()
2539 power_pmu.capabilities |= (ppmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS); in register_power_pmu()