aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor_64.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_64.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_64.h')
-rw-r--r--include/asm-x86/processor_64.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h
index 1984a4a38b74..8d342c23ad14 100644
--- a/include/asm-x86/processor_64.h
+++ b/include/asm-x86/processor_64.h
@@ -91,14 +91,6 @@ extern void identify_cpu(struct cpuinfo_x86 *);
91#define TASK_SIZE (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE64) 91#define TASK_SIZE (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE64)
92#define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? IA32_PAGE_OFFSET : TASK_SIZE64) 92#define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? IA32_PAGE_OFFSET : TASK_SIZE64)
93 93
94/*
95 * Size of io_bitmap.
96 */
97#define IO_BITMAP_BITS 65536
98#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
99#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
100#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
101#define INVALID_IO_BITMAP_OFFSET 0x8000
102 94
103struct i387_fxsave_struct { 95struct i387_fxsave_struct {
104 u16 cwd; 96 u16 cwd;
@@ -118,32 +110,7 @@ union i387_union {
118 struct i387_fxsave_struct fxsave; 110 struct i387_fxsave_struct fxsave;
119}; 111};
120 112
121struct tss_struct {
122 u32 reserved1;
123 u64 sp0;
124 u64 sp1;
125 u64 sp2;
126 u64 reserved2;
127 u64 ist[7];
128 u32 reserved3;
129 u32 reserved4;
130 u16 reserved5;
131 u16 io_bitmap_base;
132 /*
133 * The extra 1 is there because the CPU will access an
134 * additional byte beyond the end of the IO permission
135 * bitmap. The extra byte must be all 1 bits, and must
136 * be within the limit. Thus we have:
137 *
138 * 128 bytes, the bitmap itself, for ports 0..0x3ff
139 * 8 bytes, for an extra "long" of ~0UL
140 */
141 unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
142} __attribute__((packed)) ____cacheline_aligned;
143
144
145extern struct cpuinfo_x86 boot_cpu_data; 113extern struct cpuinfo_x86 boot_cpu_data;
146DECLARE_PER_CPU(struct tss_struct,init_tss);
147/* Save the original ist values for checking stack pointers during debugging */ 114/* Save the original ist values for checking stack pointers during debugging */
148struct orig_ist { 115struct orig_ist {
149 unsigned long ist[7]; 116 unsigned long ist[7];
@@ -195,7 +162,7 @@ struct thread_struct {
195} 162}
196 163
197#define INIT_TSS { \ 164#define INIT_TSS { \
198 .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \ 165 .x86_tss.sp0 = (unsigned long)&init_stack + sizeof(init_stack) \
199} 166}
200 167
201#define INIT_MMAP \ 168#define INIT_MMAP \