diff options
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d87247d2641f..5368fbdc7801 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -15,18 +15,6 @@ | |||
15 | extern struct files_struct init_files; | 15 | extern struct files_struct init_files; |
16 | extern struct fs_struct init_fs; | 16 | extern struct fs_struct init_fs; |
17 | 17 | ||
18 | #define INIT_MM(name) \ | ||
19 | { \ | ||
20 | .mm_rb = RB_ROOT, \ | ||
21 | .pgd = swapper_pg_dir, \ | ||
22 | .mm_users = ATOMIC_INIT(2), \ | ||
23 | .mm_count = ATOMIC_INIT(1), \ | ||
24 | .mmap_sem = __RWSEM_INITIALIZER(name.mmap_sem), \ | ||
25 | .page_table_lock = __SPIN_LOCK_UNLOCKED(name.page_table_lock), \ | ||
26 | .mmlist = LIST_HEAD_INIT(name.mmlist), \ | ||
27 | .cpu_vm_mask = CPU_MASK_ALL, \ | ||
28 | } | ||
29 | |||
30 | #define INIT_SIGNALS(sig) { \ | 18 | #define INIT_SIGNALS(sig) { \ |
31 | .count = ATOMIC_INIT(1), \ | 19 | .count = ATOMIC_INIT(1), \ |
32 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ | 20 | .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\ |
@@ -108,6 +96,15 @@ extern struct group_info init_groups; | |||
108 | 96 | ||
109 | extern struct cred init_cred; | 97 | extern struct cred init_cred; |
110 | 98 | ||
99 | #ifdef CONFIG_PERF_COUNTERS | ||
100 | # define INIT_PERF_COUNTERS(tsk) \ | ||
101 | .perf_counter_mutex = \ | ||
102 | __MUTEX_INITIALIZER(tsk.perf_counter_mutex), \ | ||
103 | .perf_counter_list = LIST_HEAD_INIT(tsk.perf_counter_list), | ||
104 | #else | ||
105 | # define INIT_PERF_COUNTERS(tsk) | ||
106 | #endif | ||
107 | |||
111 | /* | 108 | /* |
112 | * INIT_TASK is used to set up the first task table, touch at | 109 | * INIT_TASK is used to set up the first task table, touch at |
113 | * your own risk!. Base=0, limit=0x1fffff (=2MB) | 110 | * your own risk!. Base=0, limit=0x1fffff (=2MB) |
@@ -145,8 +142,8 @@ extern struct cred init_cred; | |||
145 | .group_leader = &tsk, \ | 142 | .group_leader = &tsk, \ |
146 | .real_cred = &init_cred, \ | 143 | .real_cred = &init_cred, \ |
147 | .cred = &init_cred, \ | 144 | .cred = &init_cred, \ |
148 | .cred_exec_mutex = \ | 145 | .cred_guard_mutex = \ |
149 | __MUTEX_INITIALIZER(tsk.cred_exec_mutex), \ | 146 | __MUTEX_INITIALIZER(tsk.cred_guard_mutex), \ |
150 | .comm = "swapper", \ | 147 | .comm = "swapper", \ |
151 | .thread = INIT_THREAD, \ | 148 | .thread = INIT_THREAD, \ |
152 | .fs = &init_fs, \ | 149 | .fs = &init_fs, \ |
@@ -171,9 +168,11 @@ extern struct cred init_cred; | |||
171 | }, \ | 168 | }, \ |
172 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ | 169 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ |
173 | INIT_IDS \ | 170 | INIT_IDS \ |
171 | INIT_PERF_COUNTERS(tsk) \ | ||
174 | INIT_TRACE_IRQFLAGS \ | 172 | INIT_TRACE_IRQFLAGS \ |
175 | INIT_LOCKDEP \ | 173 | INIT_LOCKDEP \ |
176 | INIT_FTRACE_GRAPH \ | 174 | INIT_FTRACE_GRAPH \ |
175 | INIT_TRACE_RECURSION \ | ||
177 | } | 176 | } |
178 | 177 | ||
179 | 178 | ||