perf/core: adding PMU driver specific configuration
[firefly-linux-kernel-4.4.55.git] / include / linux / perf_event.h
index f9828a48f16addab4737683f3c8345ab87e52a0a..6e02e62fa1d9015a4f054f2f8060845a03ce8cb5 100644 (file)
@@ -391,6 +391,14 @@ struct pmu {
         * Filter events for PMU-specific reasons.
         */
        int (*filter_match)             (struct perf_event *event); /* optional */
+
+       /*
+        * Initial, PMU driver specific configuration.
+        */
+       int (*get_drv_configs)          (struct perf_event *event,
+                                        void __user *arg); /* optional */
+       void (*free_drv_configs)        (struct perf_event *event);
+                                       /* optional */
 };
 
 /**
@@ -558,6 +566,7 @@ struct perf_event {
        struct irq_work                 pending;
 
        atomic_t                        event_limit;
+       struct list_head                drv_configs;
 
        void (*destroy)(struct perf_event *);
        struct rcu_head                 rcu_head;