aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kernel/perf_cpum_cf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index 86ec7447e1f5..390d9ae57bb2 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -367,13 +367,6 @@ static int __hw_perf_event_init(struct perf_event *event)
367 if (ev >= PERF_CPUM_CF_MAX_CTR) 367 if (ev >= PERF_CPUM_CF_MAX_CTR)
368 return -EINVAL; 368 return -EINVAL;
369 369
370 /* The CPU measurement counter facility does not have any interrupts
371 * to do sampling. Sampling must be provided by external means,
372 * for example, by timers.
373 */
374 if (hwc->sample_period)
375 return -EINVAL;
376
377 /* Use the hardware perf event structure to store the counter number 370 /* Use the hardware perf event structure to store the counter number
378 * in 'config' member and the counter set to which the counter belongs 371 * in 'config' member and the counter set to which the counter belongs
379 * in the 'config_base'. The counter set (config_base) is then used 372 * in the 'config_base'. The counter set (config_base) is then used
@@ -418,6 +411,12 @@ static int cpumf_pmu_event_init(struct perf_event *event)
418 case PERF_TYPE_HARDWARE: 411 case PERF_TYPE_HARDWARE:
419 case PERF_TYPE_HW_CACHE: 412 case PERF_TYPE_HW_CACHE:
420 case PERF_TYPE_RAW: 413 case PERF_TYPE_RAW:
414 /* The CPU measurement counter facility does not have overflow
415 * interrupts to do sampling. Sampling must be provided by
416 * external means, for example, by timers.
417 */
418 if (is_sampling_event(event))
419 return -ENOENT;
421 err = __hw_perf_event_init(event); 420 err = __hw_perf_event_init(event);
422 break; 421 break;
423 default: 422 default: