netfilter: nf_conntrack: pass template to l4proto ->error() handler
[safe/jmp/linux-2.6] / include / linux / init_task.h
index 6646bfc..abec69b 100644 (file)
 extern struct files_struct init_files;
 extern struct fs_struct init_fs;
 
-#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),\
@@ -95,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)
@@ -162,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),            \
@@ -171,10 +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)                                      \
 }
 
 
@@ -185,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