diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-09-28 09:06:57 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-09-28 09:06:57 +0300 |
commit | 6afc0c269c3d20cde05515b00ede00e91fee0be5 (patch) | |
tree | d54e7fa59df16bb62902129dfd28956d9ae1be19 /arch/s390/kernel/perf_cpum_cf.c | |
parent | 968d712a2565121b269e1037a1517916a9769423 (diff) | |
parent | 097f70b3c4d84ffccca15195bdfde3a37c0a7c0f (diff) | |
download | linux-6afc0c269c3d20cde05515b00ede00e91fee0be5.tar.xz |
Merge branch 'linus' into perf/core, to pick up fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390/kernel/perf_cpum_cf.c')
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index cb774ff6e749..929c147e07b4 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c @@ -159,10 +159,14 @@ static int validate_ctr_auth(const struct hw_perf_event *hwc) cpuhw = &get_cpu_var(cpu_hw_events); - /* check authorization for cpu counter sets */ + /* Check authorization for cpu counter sets. + * If the particular CPU counter set is not authorized, + * return with -ENOENT in order to fall back to other + * PMUs that might suffice the event request. + */ ctrs_state = cpumf_state_ctl[hwc->config_base]; if (!(ctrs_state & cpuhw->info.auth_ctl)) - err = -EPERM; + err = -ENOENT; put_cpu_var(cpu_hw_events); return err; @@ -538,7 +542,7 @@ static int cpumf_pmu_add(struct perf_event *event, int flags) */ if (!(cpuhw->txn_flags & PERF_PMU_TXN_ADD)) if (validate_ctr_auth(&event->hw)) - return -EPERM; + return -ENOENT; ctr_set_enable(&cpuhw->state, event->hw.config_base); event->hw.state = PERF_HES_UPTODATE | PERF_HES_STOPPED; @@ -636,7 +640,7 @@ static int cpumf_pmu_commit_txn(struct pmu *pmu) state = cpuhw->state & ~((1 << CPUMF_LCCTL_ENABLE_SHIFT) - 1); state >>= CPUMF_LCCTL_ENABLE_SHIFT; if ((state & cpuhw->info.auth_ctl) != state) - return -EPERM; + return -ENOENT; cpuhw->txn_flags = 0; perf_pmu_enable(pmu); |