drivers/perf: hisi: Add support for HiSilicon UC PMU driver
[linux-2.6-microblaze.git] / drivers / perf / hisilicon / hisi_uncore_pmu.c
index 2823f38..0403145 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "hisi_uncore_pmu.h"
 
-#define HISI_GET_EVENTID(ev) (ev->hw.config_base & 0xff)
 #define HISI_MAX_PERIOD(nr) (GENMASK_ULL((nr) - 1, 0))
 
 /*
@@ -226,6 +225,9 @@ int hisi_uncore_pmu_event_init(struct perf_event *event)
        hwc->idx                = -1;
        hwc->config_base        = event->attr.config;
 
+       if (hisi_pmu->ops->check_filter && hisi_pmu->ops->check_filter(event))
+               return -EINVAL;
+
        /* Enforce to use the same CPU for all events in this PMU */
        event->cpu = hisi_pmu->on_cpu;