forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/perf/arm-cci.c
....@@ -1327,15 +1327,6 @@
13271327 if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK)
13281328 return -EOPNOTSUPP;
13291329
1330
- /* We have no filtering of any kind */
1331
- if (event->attr.exclude_user ||
1332
- event->attr.exclude_kernel ||
1333
- event->attr.exclude_hv ||
1334
- event->attr.exclude_idle ||
1335
- event->attr.exclude_host ||
1336
- event->attr.exclude_guest)
1337
- return -EINVAL;
1338
-
13391330 /*
13401331 * Following the example set by other "uncore" PMUs, we accept any CPU
13411332 * and rewrite its affinity dynamically rather than having perf core
....@@ -1433,6 +1424,7 @@
14331424 .stop = cci_pmu_stop,
14341425 .read = pmu_read,
14351426 .attr_groups = pmu_attr_groups,
1427
+ .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
14361428 };
14371429
14381430 cci_pmu->plat_device = pdev;
....@@ -1650,7 +1642,6 @@
16501642
16511643 static int cci_pmu_probe(struct platform_device *pdev)
16521644 {
1653
- struct resource *res;
16541645 struct cci_pmu *cci_pmu;
16551646 int i, ret, irq;
16561647
....@@ -1658,8 +1649,7 @@
16581649 if (IS_ERR(cci_pmu))
16591650 return PTR_ERR(cci_pmu);
16601651
1661
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1662
- cci_pmu->base = devm_ioremap_resource(&pdev->dev, res);
1652
+ cci_pmu->base = devm_platform_ioremap_resource(pdev, 0);
16631653 if (IS_ERR(cci_pmu->base))
16641654 return -ENOMEM;
16651655
....@@ -1728,6 +1718,7 @@
17281718 .driver = {
17291719 .name = DRIVER_NAME,
17301720 .of_match_table = arm_cci_pmu_matches,
1721
+ .suppress_bind_attrs = true,
17311722 },
17321723 .probe = cci_pmu_probe,
17331724 .remove = cci_pmu_remove,