s390/cpum_cf: Corrected return code for unauthorized counter sets
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Mon, 7 Sep 2015 08:52:42 +0000 (10:52 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Sep 2015 11:43:42 +0000 (13:43 +0200)
commit58f8e9da33eb0104f5bee3e8b3ca44e1583c78b9
treed889d71b48c2f548740cdefa0a37c9410a14f915
parent8d4bd0ed0439dfc780aab801a085961925ed6838
s390/cpum_cf: Corrected return code for unauthorized counter sets

Previously, the cpum_cf PMU returned -EPERM if a counter is requested and
the counter set to which the counter belongs is not authorized.  According
to the perf_event_open() system call manual, an error code of EPERM indicates
an unsupported exclude setting or CAP_SYS_ADMIN is missing.

Use ENOENT to indicate that particular counters are not available when the
counter set which contains the counter is not authorized.  For generic events,
this might trigger a fall back, for example, to a software event.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/perf_cpum_cf.c