diff options
Diffstat (limited to 'include/asm-x86/thread_info.h')
-rw-r--r-- | include/asm-x86/thread_info.h | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index 71b0880d80b5..8cd52d4bfb0e 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -39,6 +39,23 @@ struct thread_info { | |||
39 | __u8 supervisor_stack[0]; | 39 | __u8 supervisor_stack[0]; |
40 | #endif | 40 | #endif |
41 | }; | 41 | }; |
42 | |||
43 | #define INIT_THREAD_INFO(tsk) \ | ||
44 | { \ | ||
45 | .task = &tsk, \ | ||
46 | .exec_domain = &default_exec_domain, \ | ||
47 | .flags = 0, \ | ||
48 | .cpu = 0, \ | ||
49 | .preempt_count = 1, \ | ||
50 | .addr_limit = KERNEL_DS, \ | ||
51 | .restart_block = { \ | ||
52 | .fn = do_no_restart_syscall, \ | ||
53 | }, \ | ||
54 | } | ||
55 | |||
56 | #define init_thread_info (init_thread_union.thread_info) | ||
57 | #define init_stack (init_thread_union.stack) | ||
58 | |||
42 | #else /* !__ASSEMBLY__ */ | 59 | #else /* !__ASSEMBLY__ */ |
43 | 60 | ||
44 | #include <asm/asm-offsets.h> | 61 | #include <asm/asm-offsets.h> |
@@ -62,22 +79,6 @@ struct thread_info { | |||
62 | */ | 79 | */ |
63 | #ifndef __ASSEMBLY__ | 80 | #ifndef __ASSEMBLY__ |
64 | 81 | ||
65 | #define INIT_THREAD_INFO(tsk) \ | ||
66 | { \ | ||
67 | .task = &tsk, \ | ||
68 | .exec_domain = &default_exec_domain, \ | ||
69 | .flags = 0, \ | ||
70 | .cpu = 0, \ | ||
71 | .preempt_count = 1, \ | ||
72 | .addr_limit = KERNEL_DS, \ | ||
73 | .restart_block = { \ | ||
74 | .fn = do_no_restart_syscall, \ | ||
75 | }, \ | ||
76 | } | ||
77 | |||
78 | #define init_thread_info (init_thread_union.thread_info) | ||
79 | #define init_stack (init_thread_union.stack) | ||
80 | |||
81 | 82 | ||
82 | /* how to get the current stack pointer from C */ | 83 | /* how to get the current stack pointer from C */ |
83 | register unsigned long current_stack_pointer asm("esp") __used; | 84 | register unsigned long current_stack_pointer asm("esp") __used; |
@@ -181,22 +182,6 @@ static inline struct thread_info *current_thread_info(void) | |||
181 | * preempt_count needs to be 1 initially, until the scheduler is functional. | 182 | * preempt_count needs to be 1 initially, until the scheduler is functional. |
182 | */ | 183 | */ |
183 | #ifndef __ASSEMBLY__ | 184 | #ifndef __ASSEMBLY__ |
184 | #define INIT_THREAD_INFO(tsk) \ | ||
185 | { \ | ||
186 | .task = &tsk, \ | ||
187 | .exec_domain = &default_exec_domain, \ | ||
188 | .flags = 0, \ | ||
189 | .cpu = 0, \ | ||
190 | .preempt_count = 1, \ | ||
191 | .addr_limit = KERNEL_DS, \ | ||
192 | .restart_block = { \ | ||
193 | .fn = do_no_restart_syscall, \ | ||
194 | }, \ | ||
195 | } | ||
196 | |||
197 | #define init_thread_info (init_thread_union.thread_info) | ||
198 | #define init_stack (init_thread_union.stack) | ||
199 | |||
200 | static inline struct thread_info *current_thread_info(void) | 185 | static inline struct thread_info *current_thread_info(void) |
201 | { | 186 | { |
202 | struct thread_info *ti; | 187 | struct thread_info *ti; |