aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/thread_info.h
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-28 21:52:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-12 15:28:03 -0400
commit3351cc03c0762353225a79507e38db4c1e656d52 (patch)
tree251489a75be6a15b93f8cea088735c7eb660c106 /include/asm-x86/thread_info.h
parent006c484bb3d9547e82a33a09668c9b54b912c8fb (diff)
x86: threadinfo: merge INIT_THREAD_INFO
Both definitions are the same. So move to common x86 area. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/thread_info.h')
-rw-r--r--include/asm-x86/thread_info.h49
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 */
83register unsigned long current_stack_pointer asm("esp") __used; 84register 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
200static inline struct thread_info *current_thread_info(void) 185static inline struct thread_info *current_thread_info(void)
201{ 186{
202 struct thread_info *ti; 187 struct thread_info *ti;