Merge tag 'trace-ipi-tracepoints' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / arch / arc / kernel / perf_event.c
index 63177e4cb66d0d3a323b3e53081d4caaf2550ac0..b9a5685a990e25d3aeaec535e7a24bd3c991a019 100644 (file)
@@ -99,10 +99,6 @@ static int arc_pmu_event_init(struct perf_event *event)
        struct hw_perf_event *hwc = &event->hw;
        int ret;
 
-       /* ARC 700 PMU does not support sampling events */
-       if (is_sampling_event(event))
-               return -ENOENT;
-
        switch (event->attr.type) {
        case PERF_TYPE_HARDWARE:
                if (event->attr.config >= PERF_COUNT_HW_MAX)
@@ -298,6 +294,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
                .read           = arc_pmu_read,
        };
 
+       /* ARC 700 PMU does not support sampling events */
+       arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
+
        ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);
 
        return ret;