input: sensors: fromdos and remove trailing whitespace
[firefly-linux-kernel-4.4.55.git] / include / linux / perf_event.h
index d841d33bcdc9c370742db6408e1f979594d37099..9dcb00ca2ec1ffd9c3672a3f7110669c76795e89 100644 (file)
@@ -121,6 +121,7 @@ struct hw_perf_event {
                struct { /* intel_cqm */
                        int                     cqm_state;
                        u32                     cqm_rmid;
+                       int                     is_group_event;
                        struct list_head        cqm_events_entry;
                        struct list_head        cqm_groups_entry;
                        struct list_head        cqm_group_entry;
@@ -378,7 +379,7 @@ struct pmu {
        /*
         * Set up pmu-private data structures for an AUX area
         */
-       void *(*setup_aux)              (int cpu, void **pages,
+       void *(*setup_aux)              (struct perf_event *event, void **pages,
                                         int nr_pages, bool overwrite);
                                        /* optional */
 
@@ -391,6 +392,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 +567,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;
@@ -697,9 +707,11 @@ struct perf_cgroup {
  * if there is no cgroup event for the current CPU context.
  */
 static inline struct perf_cgroup *
-perf_cgroup_from_task(struct task_struct *task)
+perf_cgroup_from_task(struct task_struct *task, struct perf_event_context *ctx)
 {
-       return container_of(task_css(task, perf_event_cgrp_id),
+       return container_of(task_css_check(task, perf_event_cgrp_id,
+                                          ctx ? lockdep_is_held(&ctx->lock)
+                                              : true),
                            struct perf_cgroup, css);
 }
 #endif /* CONFIG_CGROUP_PERF */
@@ -987,6 +999,11 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
                loff_t *ppos);
 
 
+static inline bool perf_paranoid_any(void)
+{
+       return sysctl_perf_event_paranoid > 2;
+}
+
 static inline bool perf_paranoid_tracepoint_raw(void)
 {
        return sysctl_perf_event_paranoid > -1;