From cae2d283595638a44bd43c44e867f4ecada1d634 Mon Sep 17 00:00:00 2001 From: "konrad@kernel.org" Date: Fri, 5 Apr 2013 16:42:24 -0400 Subject: [PATCH] --- yaml --- r: 366255 b: refs/heads/master c: 4d681be3c33dd74efffbe2a8f70634f7128602ec h: refs/heads/master i: 366253: 558950084c494053f75da82af98bc1a2073033cd 366251: 432d3cb92ab5e73cdc69c9ced2155baf6c77635b 366247: 82a9137bde364658cd12650ae8ca9677f7cb8485 366239: f5a3c79883533372c0159eb7d528f01e94878221 v: v3 --- [refs] | 2 +- trunk/arch/x86/power/cpu.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 39de3a11e2e4..ce28e3aa851e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 357d122670937c35b33d99c46356ef2b63182a1f +refs/heads/master: 4d681be3c33dd74efffbe2a8f70634f7128602ec diff --git a/trunk/arch/x86/power/cpu.c b/trunk/arch/x86/power/cpu.c index 82c39c532349..168da8429032 100644 --- a/trunk/arch/x86/power/cpu.c +++ b/trunk/arch/x86/power/cpu.c @@ -132,7 +132,10 @@ static void fix_processor_context(void) { int cpu = smp_processor_id(); struct tss_struct *t = &per_cpu(init_tss, cpu); - +#ifdef CONFIG_X86_64 + struct desc_struct *desc = get_cpu_gdt_table(cpu); + tss_desc tss; +#endif set_tss_desc(cpu, t); /* * This just modifies memory; should not be * necessary. But... This is necessary, because @@ -141,7 +144,9 @@ static void fix_processor_context(void) */ #ifdef CONFIG_X86_64 - get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS].type = 9; + memcpy(&tss, &desc[GDT_ENTRY_TSS], sizeof(tss_desc)); + tss.type = 0x9; /* The available 64-bit TSS (see AMD vol 2, pg 91 */ + write_gdt_entry(desc, GDT_ENTRY_TSS, &tss, DESC_TSS); syscall_init(); /* This sets MSR_*STAR and related */ #endif