s390, perf: Use common PMU interrupt disabled code
[cascardo/linux.git] / arch / s390 / kernel / perf_cpum_cf.c
index ea75d01..d3194de 100644 (file)
@@ -411,12 +411,6 @@ static int cpumf_pmu_event_init(struct perf_event *event)
        case PERF_TYPE_HARDWARE:
        case PERF_TYPE_HW_CACHE:
        case PERF_TYPE_RAW:
-               /* The CPU measurement counter facility does not have overflow
-                * interrupts to do sampling.  Sampling must be provided by
-                * external means, for example, by timers.
-                */
-               if (is_sampling_event(event))
-                       return -ENOENT;
                err = __hw_perf_event_init(event);
                break;
        default:
@@ -681,6 +675,12 @@ static int __init cpumf_pmu_init(void)
                goto out;
        }
 
+       /* The CPU measurement counter facility does not have overflow
+        * interrupts to do sampling.  Sampling must be provided by
+        * external means, for example, by timers.
+        */
+       cpumf_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
+
        cpumf_pmu.attr_groups = cpumf_cf_event_group();
        rc = perf_pmu_register(&cpumf_pmu, "cpum_cf", PERF_TYPE_RAW);
        if (rc) {