diff options
| author | Robin Murphy <robin.murphy@arm.com> | 2025-12-15 16:05:00 +0300 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-01-07 00:27:40 +0300 |
| commit | 79448fa1f495c3e3b7119e53bedc3cce273aa95f (patch) | |
| tree | f0c0a2e6644ea9ee0f693f16f5fea9b50c6d8554 | |
| parent | 85c0dbd8b6e2ca5e672560c7cd86801bffa0d884 (diff) | |
| download | linux-79448fa1f495c3e3b7119e53bedc3cce273aa95f.tar.xz | |
perf/arm_dsu: Allow standard cycles events
Since we do not use the divide-by-64 option, there should be no
significant difference between the dedicated cycle counter and the
standard cycles event. Since using the latter on DSU-120 now has
the side-effect of allowing multiple cycles events to be scheduled
simultaneously (beneficial for multiple cycle-based metrics), there
seems little reason not to allow the same on older DSUs as well.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
| -rw-r--r-- | drivers/perf/arm_dsu_pmu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c index 56c592f0dae3..32b0dd7c693b 100644 --- a/drivers/perf/arm_dsu_pmu.c +++ b/drivers/perf/arm_dsu_pmu.c @@ -284,9 +284,8 @@ static int dsu_pmu_get_event_idx(struct dsu_hw_events *hw_events, unsigned long *used_mask = hw_events->used_mask; if (evtype == DSU_PMU_EVT_CYCLES && dsu_pmu->has_pmccntr) { - if (test_and_set_bit(DSU_PMU_IDX_CYCLE_COUNTER, used_mask)) - return -EAGAIN; - return DSU_PMU_IDX_CYCLE_COUNTER; + if (!test_and_set_bit(DSU_PMU_IDX_CYCLE_COUNTER, used_mask)) + return DSU_PMU_IDX_CYCLE_COUNTER; } idx = find_first_zero_bit(used_mask, dsu_pmu->num_counters); |
