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 | ca241c75037b32e0216a68e39ad2801d04fa1f87 (patch) | |
tree | be6b42124c9ead67999ee7ec810f9b1f1e25675d /arch | |
parent | 0ccb8acc51693a2aef0f38024943808046d81251 (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 'arch')
-rw-r--r-- | arch/x86/kernel/asm-offsets_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/doublefault_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup64.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot_64.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index a05428764314..2b32719a3fea 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -110,7 +110,7 @@ int main(void) | |||
110 | ENTRY(cr8); | 110 | ENTRY(cr8); |
111 | BLANK(); | 111 | BLANK(); |
112 | #undef ENTRY | 112 | #undef ENTRY |
113 | DEFINE(TSS_ist, offsetof(struct tss_struct, ist)); | 113 | DEFINE(TSS_ist, offsetof(struct tss_struct, x86_tss.ist)); |
114 | BLANK(); | 114 | BLANK(); |
115 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); | 115 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); |
116 | BLANK(); | 116 | BLANK(); |
diff --git a/arch/x86/kernel/doublefault_32.c b/arch/x86/kernel/doublefault_32.c index d16122a8e4eb..a47798b59f07 100644 --- a/arch/x86/kernel/doublefault_32.c +++ b/arch/x86/kernel/doublefault_32.c | |||
@@ -33,7 +33,7 @@ static void doublefault_fn(void) | |||
33 | printk(KERN_EMERG "double fault, tss at %08lx\n", tss); | 33 | printk(KERN_EMERG "double fault, tss at %08lx\n", tss); |
34 | 34 | ||
35 | if (ptr_ok(tss)) { | 35 | if (ptr_ok(tss)) { |
36 | struct i386_hw_tss *t = (struct i386_hw_tss *)tss; | 36 | struct x86_hw_tss *t = (struct x86_hw_tss *)tss; |
37 | 37 | ||
38 | printk(KERN_EMERG "eip = %08lx, esp = %08lx\n", | 38 | printk(KERN_EMERG "eip = %08lx, esp = %08lx\n", |
39 | t->ip, t->sp); | 39 | t->ip, t->sp); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 836a71adfa11..af56104b73ff 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -639,7 +639,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
639 | /* | 639 | /* |
640 | * Reload esp0, LDT and the page table pointer: | 640 | * Reload esp0, LDT and the page table pointer: |
641 | */ | 641 | */ |
642 | tss->sp0 = next->sp0; | 642 | tss->x86_tss.sp0 = next->sp0; |
643 | 643 | ||
644 | /* | 644 | /* |
645 | * Switch DS and ES. | 645 | * Switch DS and ES. |
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index 05cafcb94109..3b0ffa31f3c0 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -258,10 +258,10 @@ void __cpuinit cpu_init (void) | |||
258 | v, cpu); | 258 | v, cpu); |
259 | } | 259 | } |
260 | estacks += PAGE_SIZE << order[v]; | 260 | estacks += PAGE_SIZE << order[v]; |
261 | orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks; | 261 | orig_ist->ist[v] = t->x86_tss.ist[v] = (unsigned long)estacks; |
262 | } | 262 | } |
263 | 263 | ||
264 | t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); | 264 | t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap); |
265 | /* | 265 | /* |
266 | * <= is required because the CPU will access up to | 266 | * <= is required because the CPU will access up to |
267 | * 8 bits beyond the end of the IO permission bitmap. | 267 | * 8 bits beyond the end of the IO permission bitmap. |
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index 4c03ddccd681..2ea02a71b644 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -614,7 +614,7 @@ do_rest: | |||
614 | start_rip = setup_trampoline(); | 614 | start_rip = setup_trampoline(); |
615 | 615 | ||
616 | init_rsp = c_idle.idle->thread.sp; | 616 | init_rsp = c_idle.idle->thread.sp; |
617 | per_cpu(init_tss,cpu).sp0 = init_rsp; | 617 | per_cpu(init_tss, cpu).x86_tss.sp0 = init_rsp; |
618 | initial_code = start_secondary; | 618 | initial_code = start_secondary; |
619 | clear_tsk_thread_flag(c_idle.idle, TIF_FORK); | 619 | clear_tsk_thread_flag(c_idle.idle, TIF_FORK); |
620 | 620 | ||