aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/power/cpu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 82c39c532349..168da8429032 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -132,7 +132,10 @@ static void fix_processor_context(void)
132{ 132{
133 int cpu = smp_processor_id(); 133 int cpu = smp_processor_id();
134 struct tss_struct *t = &per_cpu(init_tss, cpu); 134 struct tss_struct *t = &per_cpu(init_tss, cpu);
135 135#ifdef CONFIG_X86_64
136 struct desc_struct *desc = get_cpu_gdt_table(cpu);
137 tss_desc tss;
138#endif
136 set_tss_desc(cpu, t); /* 139 set_tss_desc(cpu, t); /*
137 * This just modifies memory; should not be 140 * This just modifies memory; should not be
138 * necessary. But... This is necessary, because 141 * necessary. But... This is necessary, because
@@ -141,7 +144,9 @@ static void fix_processor_context(void)
141 */ 144 */
142 145
143#ifdef CONFIG_X86_64 146#ifdef CONFIG_X86_64
144 get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9; 147 memcpy(&tss, &desc[GDT_ENTRY_TSS], sizeof(tss_desc));
148 tss.type = 0x9; /* The available 64-bit TSS (see AMD vol 2, pg 91 */
149 write_gdt_entry(desc, GDT_ENTRY_TSS, &tss, DESC_TSS);
145 150
146 syscall_init(); /* This sets MSR_*STAR and related */ 151 syscall_init(); /* This sets MSR_*STAR and related */
147#endif 152#endif