Lines Matching refs:pmu
26 static int probe_current_pmu(struct arm_pmu *pmu, in probe_current_pmu() argument
38 ret = info->init(pmu); in probe_current_pmu()
46 static int pmu_parse_percpu_irq(struct arm_pmu *pmu, int irq) in pmu_parse_percpu_irq() argument
49 struct pmu_hw_events __percpu *hw_events = pmu->hw_events; in pmu_parse_percpu_irq()
51 ret = irq_get_percpu_devid_partition(irq, &pmu->supported_cpus); in pmu_parse_percpu_irq()
55 for_each_cpu(cpu, &pmu->supported_cpus) in pmu_parse_percpu_irq()
96 static int pmu_parse_irqs(struct arm_pmu *pmu) in pmu_parse_irqs() argument
99 struct platform_device *pdev = pmu->plat_device; in pmu_parse_irqs()
100 struct pmu_hw_events __percpu *hw_events = pmu->hw_events; in pmu_parse_irqs()
113 pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; in pmu_parse_irqs()
114 cpumask_setall(&pmu->supported_cpus); in pmu_parse_irqs()
121 return pmu_parse_percpu_irq(pmu, irq); in pmu_parse_irqs()
151 cpumask_set_cpu(cpu, &pmu->supported_cpus); in pmu_parse_irqs()
193 struct arm_pmu *pmu; in arm_pmu_device_probe() local
196 pmu = armpmu_alloc(); in arm_pmu_device_probe()
197 if (!pmu) in arm_pmu_device_probe()
200 pmu->plat_device = pdev; in arm_pmu_device_probe()
202 ret = pmu_parse_irqs(pmu); in arm_pmu_device_probe()
208 pmu->secure_access = of_property_read_bool(dev->of_node, in arm_pmu_device_probe()
212 if (IS_ENABLED(CONFIG_ARM64) && pmu->secure_access) { in arm_pmu_device_probe()
214 pmu->secure_access = false; in arm_pmu_device_probe()
217 ret = init_fn(pmu); in arm_pmu_device_probe()
219 cpumask_setall(&pmu->supported_cpus); in arm_pmu_device_probe()
220 ret = probe_current_pmu(pmu, probe_table); in arm_pmu_device_probe()
228 ret = armpmu_request_irqs(pmu); in arm_pmu_device_probe()
232 ret = armpmu_register(pmu); in arm_pmu_device_probe()
241 armpmu_free_irqs(pmu); in arm_pmu_device_probe()
243 armpmu_free(pmu); in arm_pmu_device_probe()