Lines Matching refs:armpmu

198 	struct arm_pmu *armpmu = to_arm_pmu(event->pmu);  in armpmu_event_set_period()  local
231 armpmu->write_counter(event, (u64)(-left) & max_period); in armpmu_event_set_period()
240 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_update() local
247 new_raw_count = armpmu->read_counter(event); in armpmu_event_update()
270 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_stop() local
278 armpmu->disable(event); in armpmu_stop()
286 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_start() local
305 armpmu->enable(event); in armpmu_start()
311 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_del() local
312 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_del()
318 armpmu->clear_event_idx(hw_events, event); in armpmu_del()
327 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_add() local
328 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_add()
333 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_add()
337 idx = armpmu->get_event_idx(hw_events, event); in armpmu_add()
346 armpmu->disable(event); in armpmu_add()
363 struct arm_pmu *armpmu; in validate_event() local
382 armpmu = to_arm_pmu(event->pmu); in validate_event()
383 return armpmu->get_event_idx(hw_events, event) >= 0; in validate_event()
414 struct arm_pmu *armpmu; in armpmu_dispatch_irq() local
424 armpmu = *(void **)dev; in armpmu_dispatch_irq()
425 if (WARN_ON_ONCE(!armpmu)) in armpmu_dispatch_irq()
429 ret = armpmu->handle_irq(armpmu); in armpmu_dispatch_irq()
439 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in __hw_perf_event_init() local
444 mapping = armpmu->map_event(event); in __hw_perf_event_init()
466 if (armpmu->set_event_filter && in __hw_perf_event_init()
467 armpmu->set_event_filter(hwc, &event->attr)) { in __hw_perf_event_init()
500 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_init() local
510 !cpumask_test_cpu(event->cpu, &armpmu->supported_cpus)) in armpmu_event_init()
517 if (armpmu->map_event(event) == -ENOENT) in armpmu_event_init()
525 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_enable() local
526 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in armpmu_enable()
527 int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); in armpmu_enable()
530 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_enable()
534 armpmu->start(armpmu); in armpmu_enable()
539 struct arm_pmu *armpmu = to_arm_pmu(pmu); in armpmu_disable() local
542 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in armpmu_disable()
545 armpmu->stop(armpmu); in armpmu_disable()
555 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_filter_match() local
559 ret = cpumask_test_cpu(cpu, &armpmu->supported_cpus); in armpmu_filter_match()
560 if (ret && armpmu->filter_match) in armpmu_filter_match()
561 return armpmu->filter_match(event); in armpmu_filter_match()
569 struct arm_pmu *armpmu = to_arm_pmu(dev_get_drvdata(dev)); in armpmu_cpumask_show() local
570 return cpumap_print_to_pagebuf(true, buf, &armpmu->supported_cpus); in armpmu_cpumask_show()
772 static void cpu_pm_pmu_setup(struct arm_pmu *armpmu, unsigned long cmd) in cpu_pm_pmu_setup() argument
774 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in cpu_pm_pmu_setup()
778 for (idx = 0; idx < armpmu->num_events; idx++) { in cpu_pm_pmu_setup()
815 struct arm_pmu *armpmu = container_of(b, struct arm_pmu, cpu_pm_nb); in cpu_pm_pmu_notify() local
816 struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); in cpu_pm_pmu_notify()
817 int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); in cpu_pm_pmu_notify()
819 if (!cpumask_test_cpu(smp_processor_id(), &armpmu->supported_cpus)) in cpu_pm_pmu_notify()
826 if (cmd == CPU_PM_EXIT && armpmu->reset) in cpu_pm_pmu_notify()
827 armpmu->reset(armpmu); in cpu_pm_pmu_notify()
834 armpmu->stop(armpmu); in cpu_pm_pmu_notify()
835 cpu_pm_pmu_setup(armpmu, cmd); in cpu_pm_pmu_notify()
839 cpu_pm_pmu_setup(armpmu, cmd); in cpu_pm_pmu_notify()
840 armpmu->start(armpmu); in cpu_pm_pmu_notify()