Lines Matching refs:armpmu

121 	struct arm_pmu *armpmu = to_arm_pmu(event->pmu);  in armpmu_event_set_period()  local
154 armpmu->write_counter(event, (u64)(-left) & max_period); in armpmu_event_set_period()
163 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_update() local
170 new_raw_count = armpmu->read_counter(event); in armpmu_event_update()
193 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_stop() local
201 armpmu->disable(event); in armpmu_stop()
209 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_start() local
228 armpmu->enable(event); in armpmu_start()
234 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_del() local
235 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_del()
241 armpmu->clear_event_idx(hw_events, event); in armpmu_del()
250 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_add() local
251 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_add()
256 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_add()
260 idx = armpmu->get_event_idx(hw_events, event); in armpmu_add()
269 armpmu->disable(event); in armpmu_add()
286 struct arm_pmu *armpmu; in validate_event() local
305 armpmu = to_arm_pmu(event->pmu); in validate_event()
306 return armpmu->get_event_idx(hw_events, event) >= 0; in validate_event()
337 struct arm_pmu *armpmu; in armpmu_dispatch_irq() local
347 armpmu = *(void **)dev; in armpmu_dispatch_irq()
348 if (WARN_ON_ONCE(!armpmu)) in armpmu_dispatch_irq()
352 ret = armpmu->handle_irq(armpmu); in armpmu_dispatch_irq()
369 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in __hw_perf_event_init() local
374 mapping = armpmu->map_event(event); in __hw_perf_event_init()
396 if ((!armpmu->set_event_filter || in __hw_perf_event_init()
397 armpmu->set_event_filter(hwc, &event->attr)) && in __hw_perf_event_init()
431 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_init() local
441 !cpumask_test_cpu(event->cpu, &armpmu->supported_cpus)) in armpmu_event_init()
448 if (armpmu->map_event(event) == -ENOENT) in armpmu_event_init()
456 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_enable() local
457 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_enable()
458 int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); in armpmu_enable()
461 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_enable()
465 armpmu->start(armpmu); in armpmu_enable()
470 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_disable() local
473 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_disable()
476 armpmu->stop(armpmu); in armpmu_disable()
486 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_filter_match() local
490 ret = cpumask_test_cpu(cpu, &armpmu->supported_cpus); in armpmu_filter_match()
491 if (ret && armpmu->filter_match) in armpmu_filter_match()
492 return armpmu->filter_match(event); in armpmu_filter_match()
500 struct arm_pmu *armpmu = to_arm_pmu(dev_get_drvdata(dev)); in armpmu_cpumask_show() local
501 return cpumap_print_to_pagebuf(true, buf, &armpmu->supported_cpus); in armpmu_cpumask_show()
667 static void cpu_pm_pmu_setup(struct arm_pmu *armpmu, unsigned long cmd) in cpu_pm_pmu_setup() argument
669 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in cpu_pm_pmu_setup()
673 for (idx = 0; idx < armpmu->num_events; idx++) { in cpu_pm_pmu_setup()
710 struct arm_pmu *armpmu = container_of(b, struct arm_pmu, cpu_pm_nb); in cpu_pm_pmu_notify() local
711 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in cpu_pm_pmu_notify()
712 int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); in cpu_pm_pmu_notify()
714 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in cpu_pm_pmu_notify()
721 if (cmd == CPU_PM_EXIT && armpmu->reset) in cpu_pm_pmu_notify()
722 armpmu->reset(armpmu); in cpu_pm_pmu_notify()
729 armpmu->stop(armpmu); in cpu_pm_pmu_notify()
730 cpu_pm_pmu_setup(armpmu, cmd); in cpu_pm_pmu_notify()
733 cpu_pm_pmu_setup(armpmu, cmd); in cpu_pm_pmu_notify()
735 armpmu->start(armpmu); in cpu_pm_pmu_notify()