@@ -696,9 +696,7 @@ static int ali_drw_pmu_probe(struct platform_device *pdev)
.stop = ali_drw_pmu_stop,
.read = ali_drw_pmu_read,
.attr_groups = ali_drw_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
ret = perf_pmu_register(&drw_pmu->pmu, name, -1);
@@ -483,9 +483,7 @@ int meson_ddr_pmu_create(struct platform_device *pdev)
*pmu = (struct ddr_pmu) {
.pmu = {
.module = THIS_MODULE,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.attr_groups = attr_groups,
.event_init = meson_ddr_perf_event_init,
@@ -1407,9 +1407,7 @@ static int cci_pmu_init(struct cci_pmu *cci_pmu, struct platform_device *pdev)
.stop = cci_pmu_stop,
.read = pmu_read,
.attr_groups = pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
cci_pmu->plat_device = pdev;
@@ -1257,9 +1257,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
.read = arm_ccn_pmu_event_read,
.pmu_enable = arm_ccn_pmu_enable,
.pmu_disable = arm_ccn_pmu_disable,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
/* No overflow interrupt? Have to use a timer instead. */
@@ -2463,9 +2463,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.attr_groups = arm_cmn_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.pmu_enable = arm_cmn_pmu_enable,
.pmu_disable = arm_cmn_pmu_disable,
@@ -1179,9 +1179,7 @@ static int arm_cspmu_register_pmu(struct arm_cspmu *cspmu)
.stop = arm_cspmu_stop,
.read = arm_cspmu_read,
.attr_groups = (const struct attribute_group **)attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
/* Hardware counter init */
@@ -657,9 +657,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev)
dmc620_pmu->pmu = (struct pmu) {
.module = THIS_MODULE,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.event_init = dmc620_pmu_event_init,
.add = dmc620_pmu_add,
@@ -742,9 +742,7 @@ static int dsu_pmu_device_probe(struct platform_device *pdev)
.read = dsu_pmu_read,
.attr_groups = dsu_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
rc = perf_pmu_register(&dsu_pmu->pmu, name, -1);
@@ -857,9 +857,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
.stop = smmu_pmu_event_stop,
.read = smmu_pmu_event_read,
.attr_groups = smmu_pmu_attr_grps,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
smmu_pmu->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res_0);
@@ -864,9 +864,7 @@ static int cxl_pmu_probe(struct device *dev)
.read = cxl_pmu_read,
.task_ctx_nr = perf_invalid_context,
.attr_groups = cxl_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
if (info->irq <= 0)
@@ -625,9 +625,7 @@ static int dwc_pcie_pmu_probe(struct platform_device *plat_dev)
.parent = &pdev->dev,
.module = THIS_MODULE,
.attr_groups = dwc_pcie_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.event_init = dwc_pcie_pmu_event_init,
.add = dwc_pcie_pmu_event_add,
@@ -640,9 +640,7 @@ static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base,
*pmu = (struct ddr_pmu) {
.pmu = (struct pmu) {
.module = THIS_MODULE,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.attr_groups = attr_groups,
.event_init = ddr_perf_event_init,
@@ -517,9 +517,7 @@ static void ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base,
*pmu = (struct ddr_pmu) {
.pmu = (struct pmu) {
.module = THIS_MODULE,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.attr_groups = attr_groups,
.event_init = ddr_perf_event_init,
@@ -805,9 +805,7 @@ static int hisi_pcie_alloc_pmu(struct pci_dev *pdev, struct hisi_pcie_pmu *pcie_
.read = hisi_pcie_pmu_read,
.task_ctx_nr = perf_invalid_context,
.attr_groups = hisi_pcie_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
return 0;
@@ -530,9 +530,7 @@ void hisi_pmu_init(struct hisi_pmu *hisi_pmu, struct module *module)
pmu->stop = hisi_uncore_pmu_stop;
pmu->read = hisi_uncore_pmu_read;
pmu->attr_groups = hisi_pmu->pmu_events.attr_groups;
- pmu->capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS;
+ pmu->capabilities = PERF_PMU_UNCORE_CAPS;
}
EXPORT_SYMBOL_GPL(hisi_pmu_init);
@@ -1422,9 +1422,7 @@ static int hns3_pmu_alloc_pmu(struct pci_dev *pdev, struct hns3_pmu *hns3_pmu)
.read = hns3_pmu_read,
.task_ctx_nr = perf_invalid_context,
.attr_groups = hns3_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
return 0;
@@ -643,9 +643,7 @@ static int cn10k_ddr_perf_probe(struct platform_device *pdev)
ddr_pmu->pmu = (struct pmu) {
.module = THIS_MODULE,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.attr_groups = cn10k_attr_groups,
.event_init = cn10k_ddr_perf_event_init,
@@ -317,9 +317,7 @@ static int tad_pmu_probe(struct platform_device *pdev)
.module = THIS_MODULE,
.attr_groups = tad_pmu_attr_groups,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
.task_ctx_nr = perf_invalid_context,
.event_init = tad_pmu_event_init,
@@ -897,9 +897,7 @@ static int l2_cache_pmu_probe(struct platform_device *pdev)
.stop = l2_cache_event_stop,
.read = l2_cache_event_read,
.attr_groups = l2_cache_pmu_attr_grps,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
l2cache_pmu->num_counters = get_num_counters();
@@ -741,9 +741,7 @@ static int qcom_l3_cache_pmu_probe(struct platform_device *pdev)
.read = qcom_l3_cache__event_read,
.attr_groups = qcom_l3_cache_pmu_attr_grps,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
l3pmu->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &memrc);
@@ -722,9 +722,7 @@ static int tx2_uncore_pmu_register(
.start = tx2_uncore_event_start,
.stop = tx2_uncore_event_stop,
.read = tx2_uncore_event_read,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
tx2_pmu->pmu.name = devm_kasprintf(dev, GFP_KERNEL,
@@ -1098,9 +1098,7 @@ static int xgene_init_perf(struct xgene_pmu_dev *pmu_dev, char *name)
.start = xgene_perf_start,
.stop = xgene_perf_stop,
.read = xgene_perf_read,
- .capabilities = PERF_PMU_CAP_NO_EXCLUDE |
- PERF_PMU_CAP_NO_SAMPLING |
- PERF_PMU_CAP_NO_COMMON_EVENTS,
+ .capabilities = PERF_PMU_UNCORE_CAPS,
};
/* Hardware counter init */
Now that we've ratified it, adopt PERF_PMU_UNCORE_CAPS. Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- drivers/perf/alibaba_uncore_drw_pmu.c | 4 +--- drivers/perf/amlogic/meson_ddr_pmu_core.c | 4 +--- drivers/perf/arm-cci.c | 4 +--- drivers/perf/arm-ccn.c | 4 +--- drivers/perf/arm-cmn.c | 4 +--- drivers/perf/arm_cspmu/arm_cspmu.c | 4 +--- drivers/perf/arm_dmc620_pmu.c | 4 +--- drivers/perf/arm_dsu_pmu.c | 4 +--- drivers/perf/arm_smmuv3_pmu.c | 4 +--- drivers/perf/cxl_pmu.c | 4 +--- drivers/perf/dwc_pcie_pmu.c | 4 +--- drivers/perf/fsl_imx8_ddr_perf.c | 4 +--- drivers/perf/fsl_imx9_ddr_perf.c | 4 +--- drivers/perf/hisilicon/hisi_pcie_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +--- drivers/perf/hisilicon/hns3_pmu.c | 4 +--- drivers/perf/marvell_cn10k_ddr_pmu.c | 4 +--- drivers/perf/marvell_cn10k_tad_pmu.c | 4 +--- drivers/perf/qcom_l2_pmu.c | 4 +--- drivers/perf/qcom_l3_pmu.c | 4 +--- drivers/perf/thunderx2_pmu.c | 4 +--- drivers/perf/xgene_pmu.c | 4 +--- 22 files changed, 22 insertions(+), 66 deletions(-)