We currently return -EPERM if the user requests mode exclusion that is not supported by the CPU. This looks pretty confusing from userspace and is inconsistent with other architectures (ppc, x86). This patch returns -EOPNOTSUPP instead.
Unified · Split
| @@ -503,7 +503,7 @@ __hw_perf_event_init(struct perf_event *event) · 502 unmodified lines | ||
| 503 | 503 | event_requires_mode_exclusion(&event->attr)) { |
| 504 | 504 | pr_debug("ARM performance counters do not support " |
| 505 | 505 | "mode exclusion\n"); |
| 506 | − return -EPERM; | |
| 506 | + return -EOPNOTSUPP; | |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | /* |