Commit 0bb2ae1b authored by Thomas Richter's avatar Thomas Richter Committed by Martin Schwidefsky

s390/perf: Change CPUM_CF return code in event init function

The function perf_init_event() creates a new event and
assignes it to a PMU. This a done in a loop over all existing
PMUs. For each listed PMU the event init function is called
and if this function does return any other error than -ENOENT,
the loop is terminated the creation of the event fails.

If the event is invalid, return -ENOENT to try other PMUs.
Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 02522ad7
...@@ -373,7 +373,7 @@ static int __hw_perf_event_init(struct perf_event *event) ...@@ -373,7 +373,7 @@ static int __hw_perf_event_init(struct perf_event *event)
return -ENOENT; return -ENOENT;
if (ev > PERF_CPUM_CF_MAX_CTR) if (ev > PERF_CPUM_CF_MAX_CTR)
return -EINVAL; return -ENOENT;
/* Obtain the counter set to which the specified counter belongs */ /* Obtain the counter set to which the specified counter belongs */
set = get_counter_set(ev); set = get_counter_set(ev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment