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 (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()
919 pr_info("CPU: %d PMU registers, ppmu = %s n_counters = %d", 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()
1377 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_disable()
1402 if (ppmu->flags & PPMU_ARCH_207S) { in power_pmu_disable()
1430 if (!ppmu) in power_pmu_enable()
1470 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1480 if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_events, hwc_index, in power_pmu_enable()
1481 &cpuhw->mmcr, cpuhw->event, ppmu->flags)) { in power_pmu_enable()
1487 if (!(ppmu->flags & PPMU_ARCH_207S)) { in power_pmu_enable()
1512 if (ppmu->flags & PPMU_ARCH_207S) in power_pmu_enable()
1515 if (ppmu->flags & PPMU_ARCH_31) in power_pmu_enable()
1576 ppmu->config_bhrb(cpuhw->bhrb_filter); in power_pmu_enable()
1642 if (n0 >= ppmu->n_counter) in power_pmu_add()
1684 if (ppmu->bhrb_filter_map) in power_pmu_add()
1685 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_add()
1722 ppmu->disable_pmc(event->hw.idx - 1, &cpuhw->mmcr); in power_pmu_del()
1865 if (!ppmu) in power_pmu_commit_txn()
1910 if (ppmu->limited_pmc_event(ev)) in can_go_on_limited_pmc()
1917 if (!ppmu->get_alternatives) in can_go_on_limited_pmc()
1921 n = ppmu->get_alternatives(ev, flags, alt); in can_go_on_limited_pmc()
1937 n = ppmu->get_alternatives(ev, flags, alt); in normal_pmc_alternative()
1969 if (!ppmu->cache_events) in hw_perf_cache_event()
1982 ev = (*ppmu->cache_events)[type][op][result]; in hw_perf_cache_event()
1995 for (i=0; i < ppmu->n_blacklist_ev; i++) { in is_event_blacklisted()
1996 if (ppmu->blacklist_ev[i] == ev) in is_event_blacklisted()
2014 if (!ppmu) in power_pmu_event_init()
2019 if (!(ppmu->flags & PPMU_ARCH_207S)) in power_pmu_event_init()
2026 if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0) in power_pmu_event_init()
2029 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2031 ev = ppmu->generic_events[ev]; in power_pmu_event_init()
2038 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2044 if (ppmu->blacklist_ev && is_event_blacklisted(ev)) in power_pmu_event_init()
2058 if (ppmu->check_attr_config && in power_pmu_event_init()
2059 ppmu->check_attr_config(event)) in power_pmu_event_init()
2087 if (ppmu->flags & PPMU_LIMITED_PMC5_6) { in power_pmu_event_init()
2090 } else if (ppmu->limited_pmc_event(ev)) { in power_pmu_event_init()
2114 n = collect_events(event->group_leader, ppmu->n_counter - 1, in power_pmu_event_init()
2150 if (ppmu->bhrb_filter_map) in power_pmu_event_init()
2151 bhrb_filter = ppmu->bhrb_filter_map( in power_pmu_event_init()
2319 ppmu->get_mem_data_src) { in record_and_restart()
2320 ppmu->get_mem_data_src(&data.data_src, ppmu->flags, regs); in record_and_restart()
2325 ppmu->get_mem_weight) { in record_and_restart()
2326 ppmu->get_mem_weight(&data.weight.full, event->attr.sample_type); in record_and_restart()
2410 for (i = 0; i < ppmu->n_counter; ++i) in __perf_event_interrupt()
2415 for (i = 0; i < ppmu->n_counter; ++i) { in __perf_event_interrupt()
2498 if (ppmu) { in power_pmu_prepare_cpu()
2509 if (ppmu) in pmu_name_show()
2510 return sysfs_emit(buf, "%s", ppmu->name); in pmu_name_show()
2534 if (ppmu) in register_power_pmu()
2537 ppmu = pmu; in register_power_pmu()
2541 power_pmu.attr_groups = ppmu->attr_groups; in register_power_pmu()
2543 if (ppmu->flags & PPMU_ARCH_207S) in register_power_pmu()
2546 power_pmu.capabilities |= (ppmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS); in register_power_pmu()