diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-14 00:16:56 -0400 |
commit | fc8e1ead9314cf0e0f1922e661428b93d3a50d88 (patch) | |
tree | f3cb97c4769b74f6627a59769f1ed5c92a13c58a /include/linux/init_task.h | |
parent | 2bcaa6a4238094c5695d5b1943078388d82d3004 (diff) | |
parent | 9de48cc300fb10f7d9faa978670becf5e352462a (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/init_task.h')
-rw-r--r-- | include/linux/init_task.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d87247d2641f..7fc01b13be43 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 | ||
@@ -184,5 +183,8 @@ extern struct cred init_cred; | |||
184 | LIST_HEAD_INIT(cpu_timers[2]), \ | 183 | LIST_HEAD_INIT(cpu_timers[2]), \ |
185 | } | 184 | } |
186 | 185 | ||
186 | /* Attach to the init_task data structure for proper alignment */ | ||
187 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
188 | |||
187 | 189 | ||
188 | #endif | 190 | #endif |