summaryrefslogtreecommitdiff
path: root/drivers/perf/arm_pmuv3.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2023-12-11 16:13:21 +0000
committerWill Deacon <will@kernel.org>2023-12-12 09:46:22 +0000
commit186c91aaf54989a9c74869dcc6ba031313d8e2b8 (patch)
treef37e4c8e88c0e4dae71050917ffc2bae2948deca /drivers/perf/arm_pmuv3.c
parentc7b98bf0fc79bd2d91f6ef84e07b5f648d43c13e (diff)
arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs
-EPERM or -EINVAL always get converted to -EOPNOTSUPP, so replace them. This will allow __hw_perf_event_init() to return a different code or not print that particular message for a different error in the next commit. Signed-off-by: James Clark <james.clark@arm.com> Link: https://lore.kernel.org/r/20231211161331.1277825-10-james.clark@arm.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/arm_pmuv3.c')
-rw-r--r--drivers/perf/arm_pmuv3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 8a573db81da1..2ba215f74d92 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -936,8 +936,10 @@ static int armv8pmu_set_event_filter(struct hw_perf_event *event,
{
unsigned long config_base = 0;
- if (attr->exclude_idle)
- return -EPERM;
+ if (attr->exclude_idle) {
+ pr_debug("ARM performance counters do not support mode exclusion\n");
+ return -EOPNOTSUPP;
+ }
/*
* If we're running in hyp mode, then we *are* the hypervisor.