summaryrefslogtreecommitdiffstats
path: root/drivers/perf/arm_dmc620_pmu.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 17:13:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 17:13:56 +0000
commit511e4ecd3211371086a9698ce4042700957cee33 (patch)
tree7e4c8dbd3f81844f362f480dd8c9244afd9e31dc /drivers/perf/arm_dmc620_pmu.c
parentAdding debian version 6.9.2-1~exp1. (diff)
downloadlinux-511e4ecd3211371086a9698ce4042700957cee33.tar.xz
linux-511e4ecd3211371086a9698ce4042700957cee33.zip
Merging upstream version 6.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/perf/arm_dmc620_pmu.c')
-rw-r--r--drivers/perf/arm_dmc620_pmu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/perf/arm_dmc620_pmu.c b/drivers/perf/arm_dmc620_pmu.c
index 8a81be2dd5..88c17c1d6d 100644
--- a/drivers/perf/arm_dmc620_pmu.c
+++ b/drivers/perf/arm_dmc620_pmu.c
@@ -542,12 +542,16 @@ static int dmc620_pmu_event_init(struct perf_event *event)
if (event->cpu < 0)
return -EINVAL;
+ hwc->idx = -1;
+
+ if (event->group_leader == event)
+ return 0;
+
/*
* We can't atomically disable all HW counters so only one event allowed,
* although software events are acceptable.
*/
- if (event->group_leader != event &&
- !is_software_event(event->group_leader))
+ if (!is_software_event(event->group_leader))
return -EINVAL;
for_each_sibling_event(sibling, event->group_leader) {
@@ -556,7 +560,6 @@ static int dmc620_pmu_event_init(struct perf_event *event)
return -EINVAL;
}
- hwc->idx = -1;
return 0;
}