2121
2222#include <asm/thread_info.h>
2323
24- #ifdef CONFIG_SMP
25- # define INIT_PUSHABLE_TASKS (tsk ) \
26- .pushable_tasks = PLIST_NODE_INIT(tsk.pushable_tasks, MAX_PRIO),
27- #else
28- # define INIT_PUSHABLE_TASKS (tsk )
29- #endif
30-
3124extern struct files_struct init_files ;
3225extern struct fs_struct init_fs ;
3326
34- #ifdef CONFIG_CPUSETS
35- #define INIT_CPUSET_SEQ (tsk ) \
36- .mems_allowed_seq = SEQCNT_ZERO(tsk.mems_allowed_seq),
37- #else
38- #define INIT_CPUSET_SEQ (tsk )
39- #endif
40-
4127#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
4228#define INIT_PREV_CPUTIME (x ) .prev_cputime = { \
4329 .lock = __RAW_SPIN_LOCK_UNLOCKED(x.prev_cputime.lock), \
@@ -117,107 +103,10 @@ extern struct group_info init_groups;
117103 .pid = &init_struct_pid, \
118104}
119105
120- #ifdef CONFIG_AUDITSYSCALL
121- #define INIT_IDS \
122- .loginuid = INVALID_UID, \
123- .sessionid = (unsigned int)-1,
124- #else
125- #define INIT_IDS
126- #endif
127-
128- #ifdef CONFIG_PREEMPT_RCU
129- #define INIT_TASK_RCU_PREEMPT (tsk ) \
130- .rcu_read_lock_nesting = 0, \
131- .rcu_read_unlock_special.s = 0, \
132- .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \
133- .rcu_blocked_node = NULL,
134- #else
135- #define INIT_TASK_RCU_PREEMPT (tsk )
136- #endif
137- #ifdef CONFIG_TASKS_RCU
138- #define INIT_TASK_RCU_TASKS (tsk ) \
139- .rcu_tasks_holdout = false, \
140- .rcu_tasks_holdout_list = \
141- LIST_HEAD_INIT(tsk.rcu_tasks_holdout_list), \
142- .rcu_tasks_idle_cpu = -1,
143- #else
144- #define INIT_TASK_RCU_TASKS (tsk )
145- #endif
146-
147106extern struct cred init_cred ;
148107
149- #ifdef CONFIG_CGROUP_SCHED
150- # define INIT_CGROUP_SCHED (tsk ) \
151- .sched_task_group = &root_task_group,
152- #else
153- # define INIT_CGROUP_SCHED (tsk )
154- #endif
155-
156- #ifdef CONFIG_PERF_EVENTS
157- # define INIT_PERF_EVENTS (tsk ) \
158- .perf_event_mutex = \
159- __MUTEX_INITIALIZER(tsk.perf_event_mutex), \
160- .perf_event_list = LIST_HEAD_INIT(tsk.perf_event_list),
161- #else
162- # define INIT_PERF_EVENTS (tsk )
163- #endif
164-
165- #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
166- # define INIT_VTIME (tsk ) \
167- .vtime.seqcount = SEQCNT_ZERO(tsk.vtime.seqcount), \
168- .vtime.starttime = 0, \
169- .vtime.state = VTIME_SYS,
170- #else
171- # define INIT_VTIME (tsk )
172- #endif
173-
174108#define INIT_TASK_COMM "swapper"
175109
176- #ifdef CONFIG_RT_MUTEXES
177- # define INIT_RT_MUTEXES (tsk ) \
178- .pi_waiters = RB_ROOT_CACHED, \
179- .pi_top_task = NULL,
180- #else
181- # define INIT_RT_MUTEXES (tsk )
182- #endif
183-
184- #ifdef CONFIG_NUMA_BALANCING
185- # define INIT_NUMA_BALANCING (tsk ) \
186- .numa_preferred_nid = -1, \
187- .numa_group = NULL, \
188- .numa_faults = NULL,
189- #else
190- # define INIT_NUMA_BALANCING (tsk )
191- #endif
192-
193- #ifdef CONFIG_KASAN
194- # define INIT_KASAN (tsk ) \
195- .kasan_depth = 1,
196- #else
197- # define INIT_KASAN (tsk )
198- #endif
199-
200- #ifdef CONFIG_LIVEPATCH
201- # define INIT_LIVEPATCH (tsk ) \
202- .patch_state = KLP_UNDEFINED,
203- #else
204- # define INIT_LIVEPATCH (tsk )
205- #endif
206-
207- #ifdef CONFIG_THREAD_INFO_IN_TASK
208- # define INIT_TASK_TI (tsk ) \
209- .thread_info = INIT_THREAD_INFO(tsk), \
210- .stack_refcount = ATOMIC_INIT(1),
211- #else
212- # define INIT_TASK_TI (tsk )
213- #endif
214-
215- #ifdef CONFIG_SECURITY
216- #define INIT_TASK_SECURITY .security = NULL,
217- #else
218- #define INIT_TASK_SECURITY
219- #endif
220-
221110/* Attach to the init_task data structure for proper alignment */
222111#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
223112#define __init_task_data __attribute__((__section__(".data..init_task")))
@@ -228,5 +117,4 @@ extern struct cred init_cred;
228117/* Attach to the thread_info data structure for proper alignment */
229118#define __init_thread_info __attribute__((__section__(".data..init_thread_info")))
230119
231-
232120#endif
0 commit comments