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

Commit 230c4aad authored by Mischa Jonker's avatar Mischa Jonker Committed by Vineet Gupta
Browse files

ARC: perf: ARC 700 PMU doesn't support sampling events



The ARC 700 does not have an interrupt associated with it, and as
such it cannot trigger when a counter overflows. As the counters are
48 bit, it will usually take at least 100 days before a counter
overflows, so for mere counting of events, there is no problem.
Sampling is not supported though.

Signed-off-by: default avatarMischa Jonker <mjonker@synopsys.com>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent d6a7f73d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -99,6 +99,10 @@ static int arc_pmu_event_init(struct perf_event *event)
	struct hw_perf_event *hwc = &event->hw;
	int ret;

	/* ARC 700 PMU does not support sampling events */
	if (is_sampling_event(event))
		return -ENOENT;

	switch (event->attr.type) {
	case PERF_TYPE_HARDWARE:
		if (event->attr.config >= PERF_COUNT_HW_MAX)