aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor_32.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:31:31 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:31 -0500
commitca241c75037b32e0216a68e39ad2801d04fa1f87 (patch)
treebe6b42124c9ead67999ee7ec810f9b1f1e25675d /include/asm-x86/processor_32.h
parent0ccb8acc51693a2aef0f38024943808046d81251 (diff)
x86: unify tss_struct
Although slighly different, the tss_struct is very similar in x86_64 and i386. The really different part, which matchs the hardware vision of it, is now called x86_hw_tss, and each of the architectures provides yours. It's then used as a field in the outter tss_struct. 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_32.h')
-rw-r--r--include/asm-x86/processor_32.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h
index 6cd2149dcbad..57b345bc3c74 100644
--- a/include/asm-x86/processor_32.h
+++ b/include/asm-x86/processor_32.h
@@ -81,7 +81,6 @@ struct cpuinfo_x86 {
81extern struct cpuinfo_x86 boot_cpu_data; 81extern struct cpuinfo_x86 boot_cpu_data;
82extern struct cpuinfo_x86 new_cpu_data; 82extern struct cpuinfo_x86 new_cpu_data;
83extern struct tss_struct doublefault_tss; 83extern struct tss_struct doublefault_tss;
84DECLARE_PER_CPU(struct tss_struct, init_tss);
85 84
86#ifdef CONFIG_SMP 85#ifdef CONFIG_SMP
87DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); 86DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
@@ -123,16 +122,6 @@ extern unsigned int mca_pentium_flag;
123#define TASK_SIZE (PAGE_OFFSET) 122#define TASK_SIZE (PAGE_OFFSET)
124 123
125 124
126/*
127 * Size of io_bitmap.
128 */
129#define IO_BITMAP_BITS 65536
130#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
131#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
132#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
133#define INVALID_IO_BITMAP_OFFSET 0x8000
134#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
135
136struct i387_fsave_struct { 125struct i387_fsave_struct {
137 long cwd; 126 long cwd;
138 long swd; 127 long swd;
@@ -185,57 +174,6 @@ typedef struct {
185 unsigned long seg; 174 unsigned long seg;
186} mm_segment_t; 175} mm_segment_t;
187 176
188struct thread_struct;
189
190/* This is the TSS defined by the hardware. */
191struct i386_hw_tss {
192 unsigned short back_link,__blh;
193 unsigned long sp0;
194 unsigned short ss0,__ss0h;
195 unsigned long sp1;
196 unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
197 unsigned long sp2;
198 unsigned short ss2,__ss2h;
199 unsigned long __cr3;
200 unsigned long ip;
201 unsigned long flags;
202 unsigned long ax, cx, dx, bx;
203 unsigned long sp, bp, si, di;
204 unsigned short es, __esh;
205 unsigned short cs, __csh;
206 unsigned short ss, __ssh;
207 unsigned short ds, __dsh;
208 unsigned short fs, __fsh;
209 unsigned short gs, __gsh;
210 unsigned short ldt, __ldth;
211 unsigned short trace, io_bitmap_base;
212} __attribute__((packed));
213
214struct tss_struct {
215 struct i386_hw_tss x86_tss;
216
217 /*
218 * The extra 1 is there because the CPU will access an
219 * additional byte beyond the end of the IO permission
220 * bitmap. The extra byte must be all 1 bits, and must
221 * be within the limit.
222 */
223 unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
224 /*
225 * Cache the current maximum and the last task that used the bitmap:
226 */
227 unsigned long io_bitmap_max;
228 struct thread_struct *io_bitmap_owner;
229 /*
230 * pads the TSS to be cacheline-aligned (size is 0x100)
231 */
232 unsigned long __cacheline_filler[35];
233 /*
234 * .. and then another 0x100 bytes for emergency kernel stack
235 */
236 unsigned long stack[64];
237} __attribute__((packed));
238
239#define ARCH_MIN_TASKALIGN 16 177#define ARCH_MIN_TASKALIGN 16
240 178
241struct thread_struct { 179struct thread_struct {