summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-02-04 16:58:26 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-04 16:58:26 -0800
commit327641da8e3e227f42690479182b896fd19486be (patch)
tree05fa7f317e854f2da5d46d4c8977486d71bb2b21 /arch/x86/xen
parent1f4f931501e9270c156d05ee76b7b872de486304 (diff)
parentef3892bd63420380d115f755d351d2071f1f805f (diff)
Merge branch 'core/percpu' into x86/paravirt
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c3
-rw-r--r--arch/x86/xen/smp.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index ff6d530ccc7..cd022c43dfb 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -917,6 +917,9 @@ asmlinkage void __init xen_start_kernel(void)
have_vcpu_info_placement = 0;
#endif
+ /* setup percpu state */
+ load_percpu_segment(0);
+
xen_smp_init();
/* Get mfn list */
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 7735e3dd359..88d5d5ec6be 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -170,7 +170,8 @@ static void __init xen_smp_prepare_boot_cpu(void)
/* We've switched to the "real" per-cpu gdt, so make sure the
old memory can be recycled */
- make_lowmem_page_readwrite(&per_cpu_var(gdt_page));
+ make_lowmem_page_readwrite(__per_cpu_load +
+ (unsigned long)&per_cpu_var(gdt_page));
xen_setup_vcpu_info_placement();
}
@@ -235,6 +236,8 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
ctxt->user_regs.ss = __KERNEL_DS;
#ifdef CONFIG_X86_32
ctxt->user_regs.fs = __KERNEL_PERCPU;
+#else
+ ctxt->gs_base_kernel = per_cpu_offset(cpu);
#endif
ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle;
ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */