Commit 230c4aadcc394fb48d865a1cd96c8725dabad56d

Authored by Mischa Jonker
Committed by Vineet Gupta
1 parent d6a7f73db7

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: Mischa Jonker <mjonker@synopsys.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

arch/arc/kernel/perf_event.c
... ... @@ -99,6 +99,10 @@
99 99 struct hw_perf_event *hwc = &event->hw;
100 100 int ret;
101 101  
  102 + /* ARC 700 PMU does not support sampling events */
  103 + if (is_sampling_event(event))
  104 + return -ENOENT;
  105 +
102 106 switch (event->attr.type) {
103 107 case PERF_TYPE_HARDWARE:
104 108 if (event->attr.config >= PERF_COUNT_HW_MAX)