diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 07:31:31 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:31 -0500 |
commit | cb38d377337cadd73fe4c582f77c5273685aeb71 (patch) | |
tree | 79dfc538f91cc3695437177691ddfebd9f377708 /include/asm-x86/processor.h | |
parent | 7818a1e0294debee02d5135e17b89f28b8871887 (diff) |
x86: unify thread struct.
The thread_struct is not fundamentally different between architectures, and
this patch puts it in the common header. What's really unique for each of
them is enclosed in ifdefs.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r-- | include/asm-x86/processor.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index b1ea52156362..0e82ad5a22a4 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -126,6 +126,50 @@ extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | |||
126 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 126 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
127 | extern unsigned short num_cache_leaves; | 127 | extern unsigned short num_cache_leaves; |
128 | 128 | ||
129 | struct thread_struct { | ||
130 | /* cached TLS descriptors. */ | ||
131 | struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; | ||
132 | unsigned long sp0; | ||
133 | unsigned long sp; | ||
134 | #ifdef CONFIG_X86_32 | ||
135 | unsigned long sysenter_cs; | ||
136 | #else | ||
137 | unsigned long usersp; /* Copy from PDA */ | ||
138 | unsigned short es, ds, fsindex, gsindex; | ||
139 | #endif | ||
140 | unsigned long ip; | ||
141 | unsigned long fs; | ||
142 | unsigned long gs; | ||
143 | /* Hardware debugging registers */ | ||
144 | unsigned long debugreg0; | ||
145 | unsigned long debugreg1; | ||
146 | unsigned long debugreg2; | ||
147 | unsigned long debugreg3; | ||
148 | unsigned long debugreg6; | ||
149 | unsigned long debugreg7; | ||
150 | /* fault info */ | ||
151 | unsigned long cr2, trap_no, error_code; | ||
152 | /* floating point info */ | ||
153 | union i387_union i387 __attribute__((aligned(16)));; | ||
154 | #ifdef CONFIG_X86_32 | ||
155 | /* virtual 86 mode info */ | ||
156 | struct vm86_struct __user *vm86_info; | ||
157 | unsigned long screen_bitmap; | ||
158 | unsigned long v86flags, v86mask, saved_sp0; | ||
159 | unsigned int saved_fs, saved_gs; | ||
160 | #endif | ||
161 | /* IO permissions */ | ||
162 | unsigned long *io_bitmap_ptr; | ||
163 | unsigned long iopl; | ||
164 | /* max allowed port in the bitmap, in bytes: */ | ||
165 | unsigned io_bitmap_max; | ||
166 | /* MSR_IA32_DEBUGCTLMSR value to switch in if TIF_DEBUGCTLMSR is set. */ | ||
167 | unsigned long debugctlmsr; | ||
168 | /* Debug Store - if not 0 points to a DS Save Area configuration; | ||
169 | * goes into MSR_IA32_DS_AREA */ | ||
170 | unsigned long ds_area_msr; | ||
171 | }; | ||
172 | |||
129 | static inline unsigned long native_get_debugreg(int regno) | 173 | static inline unsigned long native_get_debugreg(int regno) |
130 | { | 174 | { |
131 | unsigned long val = 0; /* Damn you, gcc! */ | 175 | unsigned long val = 0; /* Damn you, gcc! */ |