diff options
Diffstat (limited to 'include/asm-i386/thread_info.h')
-rw-r--r-- | include/asm-i386/thread_info.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index fdbc7f422ea..2833fa2c0dd 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -37,6 +37,7 @@ struct thread_info { | |||
37 | 0-0xBFFFFFFF for user-thead | 37 | 0-0xBFFFFFFF for user-thead |
38 | 0-0xFFFFFFFF for kernel-thread | 38 | 0-0xFFFFFFFF for kernel-thread |
39 | */ | 39 | */ |
40 | void *sysenter_return; | ||
40 | struct restart_block restart_block; | 41 | struct restart_block restart_block; |
41 | 42 | ||
42 | unsigned long previous_esp; /* ESP of the previous stack in case | 43 | unsigned long previous_esp; /* ESP of the previous stack in case |
@@ -83,17 +84,15 @@ struct thread_info { | |||
83 | #define init_stack (init_thread_union.stack) | 84 | #define init_stack (init_thread_union.stack) |
84 | 85 | ||
85 | 86 | ||
87 | /* how to get the current stack pointer from C */ | ||
88 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
89 | |||
86 | /* how to get the thread information struct from C */ | 90 | /* how to get the thread information struct from C */ |
87 | static inline struct thread_info *current_thread_info(void) | 91 | static inline struct thread_info *current_thread_info(void) |
88 | { | 92 | { |
89 | struct thread_info *ti; | 93 | return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1)); |
90 | __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1))); | ||
91 | return ti; | ||
92 | } | 94 | } |
93 | 95 | ||
94 | /* how to get the current stack pointer from C */ | ||
95 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
96 | |||
97 | /* thread information allocation */ | 96 | /* thread information allocation */ |
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | 97 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 98 | #define alloc_thread_info(tsk) \ |