Skip to contentSkip to conversation

ARM: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable

PATCH New Will Deacon 1 participant 1 message Jun 15, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable

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.

---
 arch/arm/kernel/perf_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/kernel/perf_event.c +1 -1
index 186c8cb..a02eada 100644
@@ -503,7 +503,7 @@ __hw_perf_event_init(struct perf_event *event)
 	     event_requires_mode_exclusion(&event->attr)) {
 		pr_debug("ARM performance counters do not support "
 			 "mode exclusion\n");
-		return -EPERM;
+		return -EOPNOTSUPP;
 	}
 
 	/*
Signature · 1 line
1.7.4.1