• Home
  • Raw
  • Download

Lines Matching refs:pmu

184 static struct cci_pmu_drv_data *pmu;  variable
218 return pmu->port_ranges->slave_min <= ev_code && in pmu_is_valid_slave_event()
219 ev_code <= pmu->port_ranges->slave_max; in pmu_is_valid_slave_event()
224 return pmu->port_ranges->master_min <= ev_code && in pmu_is_valid_master_event()
225 ev_code <= pmu->port_ranges->master_max; in pmu_is_valid_master_event()
263 return readl_relaxed(pmu->base + CCI_PMU_CNTR_BASE(idx) + offset); in pmu_read_register()
268 return writel_relaxed(value, pmu->base + CCI_PMU_CNTR_BASE(idx) + offset); in pmu_write_register()
298 return &pmu->hw_events; in pmu_get_hw_events()
303 struct arm_pmu *cci_pmu = to_arm_pmu(event->pmu); in pmu_get_event_idx()
347 if (pmu->nr_irqs < 1) { in pmu_request_irq()
359 for (i = 0; i < pmu->nr_irqs; i++) { in pmu_request_irq()
360 int err = request_irq(pmu->irqs[i], handler, IRQF_SHARED, in pmu_request_irq()
364 pmu->irqs[i]); in pmu_request_irq()
368 set_bit(i, &pmu->active_irqs); in pmu_request_irq()
425 for (i = 0; i < pmu->nr_irqs; i++) { in pmu_free_irq()
426 if (!test_and_clear_bit(i, &pmu->active_irqs)) in pmu_free_irq()
429 free_irq(pmu->irqs[i], cci_pmu); in pmu_free_irq()
436 struct arm_pmu *cci_pmu = to_arm_pmu(event->pmu); in pmu_enable_event()
459 struct arm_pmu *cci_pmu = to_arm_pmu(event->pmu); in pmu_disable_event()
503 struct arm_pmu *cci_pmu = to_arm_pmu(event->pmu); in pmu_read_counter()
519 struct arm_pmu *cci_pmu = to_arm_pmu(event->pmu); in pmu_write_counter()
566 pmu = devm_kzalloc(&pdev->dev, sizeof(*pmu), GFP_KERNEL); in cci_pmu_probe()
567 if (!pmu) in cci_pmu_probe()
571 pmu->base = devm_ioremap_resource(&pdev->dev, res); in cci_pmu_probe()
572 if (IS_ERR(pmu->base)) in cci_pmu_probe()
579 pmu->nr_irqs = 0; in cci_pmu_probe()
585 if (is_duplicate_irq(irq, pmu->irqs, pmu->nr_irqs)) in cci_pmu_probe()
588 pmu->irqs[pmu->nr_irqs++] = irq; in cci_pmu_probe()
601 pmu->port_ranges = port_range_by_rev(); in cci_pmu_probe()
602 if (!pmu->port_ranges) { in cci_pmu_probe()
607 pmu->cci_pmu = devm_kzalloc(&pdev->dev, sizeof(*(pmu->cci_pmu)), GFP_KERNEL); in cci_pmu_probe()
608 if (!pmu->cci_pmu) in cci_pmu_probe()
611 pmu->hw_events.events = pmu->events; in cci_pmu_probe()
612 pmu->hw_events.used_mask = pmu->used_mask; in cci_pmu_probe()
613 raw_spin_lock_init(&pmu->hw_events.pmu_lock); in cci_pmu_probe()
615 ret = cci_pmu_init(pmu->cci_pmu, pdev); in cci_pmu_probe()