netfilter: nf_conntrack: pass template to l4proto ->error() handler
[safe/jmp/linux-2.6] / include / linux / init_task.h
index fd2b11f..abec69b 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/irqflags.h>
 #include <linux/utsname.h>
 #include <linux/lockdep.h>
+#include <linux/ftrace.h>
 #include <linux/ipc.h>
 #include <linux/pid_namespace.h>
 #include <linux/user_namespace.h>
 extern struct files_struct init_files;
 extern struct fs_struct init_fs;
 
-#define INIT_KIOCTX(name, which_mm) \
-{                                                      \
-       .users          = ATOMIC_INIT(1),               \
-       .dead           = 0,                            \
-       .mm             = &which_mm,                    \
-       .user_id        = 0,                            \
-       .next           = NULL,                         \
-       .wait           = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait), \
-       .ctx_lock       = __SPIN_LOCK_UNLOCKED(name.ctx_lock), \
-       .reqs_active    = 0U,                           \
-       .max_reqs       = ~0U,                          \
-}
-
-#define INIT_MM(name) \
-{                                                              \
-       .mm_rb          = RB_ROOT,                              \
-       .pgd            = swapper_pg_dir,                       \
-       .mm_users       = ATOMIC_INIT(2),                       \
-       .mm_count       = ATOMIC_INIT(1),                       \
-       .mmap_sem       = __RWSEM_INITIALIZER(name.mmap_sem),   \
-       .page_table_lock =  __SPIN_LOCK_UNLOCKED(name.page_table_lock), \
-       .mmlist         = LIST_HEAD_INIT(name.mmlist),          \
-       .cpu_vm_mask    = CPU_MASK_ALL,                         \
-}
-
 #define INIT_SIGNALS(sig) {                                            \
        .count          = ATOMIC_INIT(1),                               \
        .wait_chldexit  = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
@@ -48,12 +24,11 @@ extern struct fs_struct init_fs;
        .posix_timers    = LIST_HEAD_INIT(sig.posix_timers),            \
        .cpu_timers     = INIT_CPU_TIMERS(sig.cpu_timers),              \
        .rlim           = INIT_RLIMITS,                                 \
-       .cputime        = { .totals = {                                 \
-               .utime = cputime_zero,                                  \
-               .stime = cputime_zero,                                  \
-               .sum_exec_runtime = 0,                                  \
-               .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock),  \
-       }, },                                                           \
+       .cputimer       = {                                             \
+               .cputime = INIT_CPUTIME,                                \
+               .running = 0,                                           \
+               .lock = __SPIN_LOCK_UNLOCKED(sig.cputimer.lock),        \
+       },                                                              \
 }
 
 extern struct nsproxy init_nsproxy;
@@ -108,19 +83,34 @@ extern struct group_info init_groups;
 #define INIT_IDS
 #endif
 
-#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
 /*
  * Because of the reduced scope of CAP_SETPCAP when filesystem
  * capabilities are in effect, it is safe to allow CAP_SETPCAP to
  * be available in the default configuration.
  */
 # define CAP_INIT_BSET  CAP_FULL_SET
+
+#ifdef CONFIG_TREE_PREEMPT_RCU
+#define INIT_TASK_RCU_PREEMPT(tsk)                                     \
+       .rcu_read_lock_nesting = 0,                                     \
+       .rcu_read_unlock_special = 0,                                   \
+       .rcu_blocked_node = NULL,                                       \
+       .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry),
 #else
-# define CAP_INIT_BSET  CAP_INIT_EFF_SET
+#define INIT_TASK_RCU_PREEMPT(tsk)
 #endif
 
 extern struct cred init_cred;
 
+#ifdef CONFIG_PERF_EVENTS
+# define INIT_PERF_EVENTS(tsk)                                 \
+       .perf_event_mutex =                                             \
+                __MUTEX_INITIALIZER(tsk.perf_event_mutex),             \
+       .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list),
+#else
+# define INIT_PERF_EVENTS(tsk)
+#endif
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -158,8 +148,8 @@ extern struct cred init_cred;
        .group_leader   = &tsk,                                         \
        .real_cred      = &init_cred,                                   \
        .cred           = &init_cred,                                   \
-       .cred_exec_mutex =                                              \
-                __MUTEX_INITIALIZER(tsk.cred_exec_mutex),              \
+       .cred_guard_mutex =                                             \
+                __MUTEX_INITIALIZER(tsk.cred_guard_mutex),             \
        .comm           = "swapper",                                    \
        .thread         = INIT_THREAD,                                  \
        .fs             = &init_fs,                                     \
@@ -175,7 +165,7 @@ extern struct cred init_cred;
        .journal_info   = NULL,                                         \
        .cpu_timers     = INIT_CPU_TIMERS(tsk.cpu_timers),              \
        .fs_excl        = ATOMIC_INIT(0),                               \
-       .pi_lock        = __SPIN_LOCK_UNLOCKED(tsk.pi_lock),            \
+       .pi_lock        = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock),        \
        .timer_slack_ns = 50000, /* 50 usec default slack */            \
        .pids = {                                                       \
                [PIDTYPE_PID]  = INIT_PID_LINK(PIDTYPE_PID),            \
@@ -184,8 +174,12 @@ extern struct cred init_cred;
        },                                                              \
        .dirties = INIT_PROP_LOCAL_SINGLE(dirties),                     \
        INIT_IDS                                                        \
+       INIT_PERF_EVENTS(tsk)                                           \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
+       INIT_FTRACE_GRAPH                                               \
+       INIT_TRACE_RECURSION                                            \
+       INIT_TASK_RCU_PREEMPT(tsk)                                      \
 }
 
 
@@ -196,5 +190,8 @@ extern struct cred init_cred;
        LIST_HEAD_INIT(cpu_timers[2]),                                  \
 }
 
+/* Attach to the init_task data structure for proper alignment */
+#define __init_task_data __attribute__((__section__(".data.init_task")))
+
 
 #endif