Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4295a5d6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "perf: Allow multiple cycle count requests" into msm-4.9

parents f8dc33a3 5970610d
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -840,11 +840,9 @@ static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,
	struct hw_perf_event *hwc = &event->hw;
	unsigned long evtype = hwc->config_base & ARMV8_PMU_EVTYPE_EVENT;

	/* Always place a cycle counter into the cycle counter. */
	/* Place the first cycle counter request into the cycle counter. */
	if (evtype == ARMV8_PMUV3_PERFCTR_CPU_CYCLES) {
		if (test_and_set_bit(ARMV8_IDX_CYCLE_COUNTER, cpuc->used_mask))
			return -EAGAIN;

		if (!test_and_set_bit(ARMV8_IDX_CYCLE_COUNTER, cpuc->used_mask))
			return ARMV8_IDX_CYCLE_COUNTER;
	}