diff options
author | Mischa Jonker <mjonker@synopsys.com> | 2013-11-13 16:06:06 +0100 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-11-15 06:22:28 +0100 |
commit | 230c4aadcc394fb48d865a1cd96c8725dabad56d (patch) | |
tree | fb4a4e81cd6a6b90733081b92eef6d6e6603902e /arch/arc/kernel | |
parent | ARC: Add documentation on DT binding for ARC700 PMU (diff) | |
download | linux-230c4aadcc394fb48d865a1cd96c8725dabad56d.tar.xz linux-230c4aadcc394fb48d865a1cd96c8725dabad56d.zip |
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>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index 759e5f3e9029..e46d81f70979 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c @@ -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) |