aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/thread_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/thread_info.h')
-rw-r--r--include/asm-x86/thread_info.h55
1 files changed, 12 insertions, 43 deletions
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
index 4b91f59de8fc..71b0880d80b5 100644
--- a/include/asm-x86/thread_info.h
+++ b/include/asm-x86/thread_info.h
@@ -11,47 +11,42 @@
11#include <asm/page.h> 11#include <asm/page.h>
12#include <asm/types.h> 12#include <asm/types.h>
13 13
14#ifdef CONFIG_X86_32
15
16#ifndef __ASSEMBLY__
17#include <asm/processor.h>
18#endif
19
20/* 14/*
21 * low level task data that entry.S needs immediate access to 15 * low level task data that entry.S needs immediate access to
22 * - this struct should fit entirely inside of one cache line 16 * - this struct should fit entirely inside of one cache line
23 * - this struct shares the supervisor stack pages 17 * - this struct shares the supervisor stack pages
24 * - if the contents of this structure are changed,
25 * the assembly constants must also be changed
26 */ 18 */
27#ifndef __ASSEMBLY__ 19#ifndef __ASSEMBLY__
20struct task_struct;
21struct exec_domain;
22#include <asm/processor.h>
28 23
29struct thread_info { 24struct thread_info {
30 struct task_struct *task; /* main task structure */ 25 struct task_struct *task; /* main task structure */
31 struct exec_domain *exec_domain; /* execution domain */ 26 struct exec_domain *exec_domain; /* execution domain */
32 unsigned long flags; /* low level flags */ 27 __u32 flags; /* low level flags */
33 unsigned long status; /* thread-synchronous flags */ 28 __u32 status; /* thread synchronous flags */
34 __u32 cpu; /* current CPU */ 29 __u32 cpu; /* current CPU */
35 int preempt_count; /* 0 => preemptable, 30 int preempt_count; /* 0 => preemptable,
36 <0 => BUG */ 31 <0 => BUG */
37 mm_segment_t addr_limit; /* thread address space: 32 mm_segment_t addr_limit;
38 0-0xBFFFFFFF user-thread
39 0-0xFFFFFFFF kernel-thread
40 */
41 void *sysenter_return;
42 struct restart_block restart_block; 33 struct restart_block restart_block;
34 void __user *sysenter_return;
35#ifdef CONFIG_X86_32
43 unsigned long previous_esp; /* ESP of the previous stack in 36 unsigned long previous_esp; /* ESP of the previous stack in
44 case of nested (IRQ) stacks 37 case of nested (IRQ) stacks
45 */ 38 */
46 __u8 supervisor_stack[0]; 39 __u8 supervisor_stack[0];
40#endif
47}; 41};
48
49#else /* !__ASSEMBLY__ */ 42#else /* !__ASSEMBLY__ */
50 43
51#include <asm/asm-offsets.h> 44#include <asm/asm-offsets.h>
52 45
53#endif 46#endif
54 47
48#ifdef CONFIG_X86_32
49
55#define PREEMPT_ACTIVE 0x10000000 50#define PREEMPT_ACTIVE 0x10000000
56#ifdef CONFIG_4KSTACKS 51#ifdef CONFIG_4KSTACKS
57#define THREAD_SIZE (4096) 52#define THREAD_SIZE (4096)
@@ -182,32 +177,6 @@ static inline struct thread_info *current_thread_info(void)
182#include <asm/pda.h> 177#include <asm/pda.h>
183 178
184/* 179/*
185 * low level task data that entry.S needs immediate access to
186 * - this struct should fit entirely inside of one cache line
187 * - this struct shares the supervisor stack pages
188 */
189#ifndef __ASSEMBLY__
190struct task_struct;
191struct exec_domain;
192#include <asm/processor.h>
193
194struct thread_info {
195 struct task_struct *task; /* main task structure */
196 struct exec_domain *exec_domain; /* execution domain */
197 __u32 flags; /* low level flags */
198 __u32 status; /* thread synchronous flags */
199 __u32 cpu; /* current CPU */
200 int preempt_count; /* 0 => preemptable,
201 <0 => BUG */
202 mm_segment_t addr_limit;
203 struct restart_block restart_block;
204#ifdef CONFIG_IA32_EMULATION
205 void __user *sysenter_return;
206#endif
207};
208#endif
209
210/*
211 * macros/functions for gaining access to the thread information structure 180 * macros/functions for gaining access to the thread information structure
212 * preempt_count needs to be 1 initially, until the scheduler is functional. 181 * preempt_count needs to be 1 initially, until the scheduler is functional.
213 */ 182 */