Merge branch 'linus' into perfcounters/core-v2
[pandora-kernel.git] / include / linux / init_task.h
index af1de95..219748d 100644 (file)
@@ -120,6 +120,16 @@ extern struct group_info init_groups;
 
 extern struct cred init_cred;
 
+#ifdef CONFIG_PERF_COUNTERS
+# define INIT_PERF_COUNTERS(tsk)                                       \
+       .perf_counter_ctx.counter_list =                                \
+               LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list),      \
+       .perf_counter_ctx.lock =                                        \
+               __SPIN_LOCK_UNLOCKED(tsk.perf_counter_ctx.lock),
+#else
+# define INIT_PERF_COUNTERS(tsk)
+#endif
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -185,6 +195,7 @@ extern struct cred init_cred;
        INIT_IDS                                                        \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
+       INIT_PERF_COUNTERS(tsk)                                         \
 }