forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/perf/qcom_l3_pmu.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for the L3 cache PMUs in Qualcomm Technologies chips.
34 *
....@@ -7,18 +8,9 @@
78 * the slices. User space needs to aggregate to individual counts to provide
89 * a global picture.
910 *
10
- * See Documentation/perf/qcom_l3_pmu.txt for more details.
11
+ * See Documentation/admin-guide/perf/qcom_l3_pmu.rst for more details.
1112 *
1213 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License version 2 and
16
- * only version 2 as published by the Free Software Foundation.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
2214 */
2315
2416 #include <linux/acpi.h>
....@@ -495,13 +487,6 @@
495487 return -ENOENT;
496488
497489 /*
498
- * There are no per-counter mode filters in the PMU.
499
- */
500
- if (event->attr.exclude_user || event->attr.exclude_kernel ||
501
- event->attr.exclude_hv || event->attr.exclude_idle)
502
- return -EINVAL;
503
-
504
- /*
505490 * Sampling not supported since these events are not core-attributable.
506491 */
507492 if (hwc->sample_period)
....@@ -777,6 +762,7 @@
777762 .read = qcom_l3_cache__event_read,
778763
779764 .attr_groups = qcom_l3_cache_pmu_attr_grps,
765
+ .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
780766 };
781767
782768 memrc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
....@@ -828,6 +814,7 @@
828814 .driver = {
829815 .name = "qcom-l3cache-pmu",
830816 .acpi_match_table = ACPI_PTR(qcom_l3_cache_pmu_acpi_match),
817
+ .suppress_bind_attrs = true,
831818 },
832819 .probe = qcom_l3_cache_pmu_probe,
833820 };