Commit 79448fa1 authored by Robin Murphy's avatar Robin Murphy Committed by Will Deacon
Browse files

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: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 85c0dbd8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -284,8 +284,7 @@ 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;
		if (!test_and_set_bit(DSU_PMU_IDX_CYCLE_COUNTER, used_mask))
			return DSU_PMU_IDX_CYCLE_COUNTER;
	}