Lines Matching refs:pmu

129 	struct pmu pmu;
140 #define to_smmu_pmu(p) (container_of(p, struct smmu_pmu, pmu))
154 static inline void smmu_pmu_enable(struct pmu *pmu)
156 struct smmu_pmu *smmu_pmu = to_smmu_pmu(pmu);
166 static inline void smmu_pmu_enable_quirk_hip08_09(struct pmu *pmu)
168 struct smmu_pmu *smmu_pmu = to_smmu_pmu(pmu);
174 smmu_pmu_enable(pmu);
177 static inline void smmu_pmu_disable(struct pmu *pmu)
179 struct smmu_pmu *smmu_pmu = to_smmu_pmu(pmu);
185 static inline void smmu_pmu_disable_quirk_hip08_09(struct pmu *pmu)
187 struct smmu_pmu *smmu_pmu = to_smmu_pmu(pmu);
198 smmu_pmu_disable(pmu);
257 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
305 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
380 if (new->pmu != curr->pmu)
383 if (to_smmu_pmu(new->pmu)->global_filter &&
391 * Implementation of abstract pmu functionality required by
398 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
404 if (event->attr.type != event->pmu->type)
458 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
471 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
488 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
513 struct smmu_pmu *smmu_pmu = to_smmu_pmu(event->pmu);
678 perf_pmu_migrate_context(&smmu_pmu->pmu, cpu, target);
726 struct smmu_pmu *pmu = dev_get_drvdata(dev);
731 writeq_relaxed(doorbell, pmu->reg_base + SMMU_PMCG_IRQ_CFG0);
732 writel_relaxed(msg->data, pmu->reg_base + SMMU_PMCG_IRQ_CFG1);
734 pmu->reg_base + SMMU_PMCG_IRQ_CFG2);
737 static void smmu_pmu_setup_msi(struct smmu_pmu *pmu)
739 struct device *dev = pmu->dev;
743 writeq_relaxed(0, pmu->reg_base + SMMU_PMCG_IRQ_CFG0);
746 if (!(readl(pmu->reg_base + SMMU_PMCG_CFGR) & SMMU_PMCG_CFGR_MSI))
755 pmu->irq = msi_get_virq(dev, 0);
761 static int smmu_pmu_setup_irq(struct smmu_pmu *pmu)
766 smmu_pmu_setup_msi(pmu);
768 irq = pmu->irq;
770 ret = devm_request_irq(pmu->dev, irq, smmu_pmu_handle_irq,
771 flags, "smmuv3-pmu", pmu);
779 smmu_pmu_disable(&smmu_pmu->pmu);
861 smmu_pmu->pmu = (struct pmu) {
934 smmu_pmu->pmu.pmu_enable = smmu_pmu_enable_quirk_hip08_09;
935 smmu_pmu->pmu.pmu_disable = smmu_pmu_disable_quirk_hip08_09;
950 err = perf_pmu_register(&smmu_pmu->pmu, name, -1);
973 perf_pmu_unregister(&smmu_pmu->pmu);
981 smmu_pmu_disable(&smmu_pmu->pmu);