Lines Matching refs:pmu

181 	if (type == event->pmu->type)  in armpmu_map_event()
198 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_set_period()
240 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_update()
270 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_stop()
286 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_start()
311 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_del()
327 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_add()
360 validate_event(struct pmu *pmu, struct pmu_hw_events *hw_events, in validate_event() argument
373 if (event->pmu != pmu) in validate_event()
382 armpmu = to_arm_pmu(event->pmu); in validate_event()
398 if (!validate_event(event->pmu, &fake_pmu, leader)) in validate_group()
402 if (!validate_event(event->pmu, &fake_pmu, sibling)) in validate_group()
406 if (!validate_event(event->pmu, &fake_pmu, event)) in validate_group()
439 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in __hw_perf_event_init()
500 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_init()
523 static void armpmu_enable(struct pmu *pmu) in armpmu_enable() argument
525 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_enable()
537 static void armpmu_disable(struct pmu *pmu) in armpmu_disable() argument
539 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_disable()
555 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_filter_match()
723 static int armpmu_get_cpu_irq(struct arm_pmu *pmu, int cpu) in armpmu_get_cpu_irq() argument
725 struct pmu_hw_events __percpu *hw_events = pmu->hw_events; in armpmu_get_cpu_irq()
737 struct arm_pmu *pmu = hlist_entry_safe(node, struct arm_pmu, node); in arm_perf_starting_cpu() local
740 if (!cpumask_test_cpu(cpu, &pmu->supported_cpus)) in arm_perf_starting_cpu()
742 if (pmu->reset) in arm_perf_starting_cpu()
743 pmu->reset(pmu); in arm_perf_starting_cpu()
745 per_cpu(cpu_armpmu, cpu) = pmu; in arm_perf_starting_cpu()
747 irq = armpmu_get_cpu_irq(pmu, cpu); in arm_perf_starting_cpu()
756 struct arm_pmu *pmu = hlist_entry_safe(node, struct arm_pmu, node); in arm_perf_teardown_cpu() local
759 if (!cpumask_test_cpu(cpu, &pmu->supported_cpus)) in arm_perf_teardown_cpu()
762 irq = armpmu_get_cpu_irq(pmu, cpu); in arm_perf_teardown_cpu()
895 struct arm_pmu *pmu; in __armpmu_alloc() local
898 pmu = kzalloc(sizeof(*pmu), flags); in __armpmu_alloc()
899 if (!pmu) { in __armpmu_alloc()
904 pmu->hw_events = alloc_percpu_gfp(struct pmu_hw_events, flags); in __armpmu_alloc()
905 if (!pmu->hw_events) { in __armpmu_alloc()
910 pmu->pmu = (struct pmu) { in __armpmu_alloc()
920 .attr_groups = pmu->attr_groups, in __armpmu_alloc()
931 pmu->attr_groups[ARMPMU_ATTR_GROUP_COMMON] = in __armpmu_alloc()
937 events = per_cpu_ptr(pmu->hw_events, cpu); in __armpmu_alloc()
939 events->percpu_pmu = pmu; in __armpmu_alloc()
942 return pmu; in __armpmu_alloc()
945 kfree(pmu); in __armpmu_alloc()
961 void armpmu_free(struct arm_pmu *pmu) in armpmu_free() argument
963 free_percpu(pmu->hw_events); in armpmu_free()
964 kfree(pmu); in armpmu_free()
967 int armpmu_register(struct arm_pmu *pmu) in armpmu_register() argument
971 ret = cpu_pmu_init(pmu); in armpmu_register()
975 if (!pmu->set_event_filter) in armpmu_register()
976 pmu->pmu.capabilities |= PERF_PMU_CAP_NO_EXCLUDE; in armpmu_register()
978 ret = perf_pmu_register(&pmu->pmu, pmu->name, -1); in armpmu_register()
983 __oprofile_cpu_pmu = pmu; in armpmu_register()
986 pmu->name, pmu->num_events, in armpmu_register()
992 cpu_pmu_destroy(pmu); in armpmu_register()