Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / include / linux / perf_event.h
index 23cd005..3fd5c82 100644 (file)
@@ -547,6 +547,8 @@ struct hw_perf_event {
 
 struct perf_event;
 
+#define PERF_EVENT_TXN_STARTED 1
+
 /**
  * struct pmu - generic performance monitoring unit
  */
@@ -557,13 +559,22 @@ struct pmu {
        void (*stop)                    (struct perf_event *event);
        void (*read)                    (struct perf_event *event);
        void (*unthrottle)              (struct perf_event *event);
+
+       /*
+        * group events scheduling is treated as a transaction,
+        * add group events as a whole and perform one schedulability test.
+        * If test fails, roll back the whole group
+        */
+
+       void (*start_txn)       (const struct pmu *pmu);
+       void (*cancel_txn)      (const struct pmu *pmu);
+       int  (*commit_txn)      (const struct pmu *pmu);
 };
 
 /**
  * enum perf_event_active_state - the states of a event
  */
 enum perf_event_active_state {
-       PERF_EVENT_STATE_FREE           = -3,
        PERF_EVENT_STATE_ERROR          = -2,
        PERF_EVENT_STATE_OFF            = -1,
        PERF_EVENT_STATE_INACTIVE       =  0,
@@ -823,9 +834,6 @@ extern void perf_disable(void);
 extern void perf_enable(void);
 extern int perf_event_task_disable(void);
 extern int perf_event_task_enable(void);
-extern int hw_perf_group_sched_in(struct perf_event *group_leader,
-              struct perf_cpu_context *cpuctx,
-              struct perf_event_context *ctx);
 extern void perf_event_update_userpage(struct perf_event *event);
 extern int perf_event_release_kernel(struct perf_event *event);
 extern struct perf_event *