ia64/xen-unstable

changeset 8944:a05e56904e7e

linux-i386: Fix CONFIG_X86_NO_TSS and CONFIG_X86_SYSENTER.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Feb 20 23:01:50 2006 +0000 (2006-02-20)
parents 687165bc9670
children 1c7145a5bb43
files linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c	Mon Feb 20 20:26:24 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c	Mon Feb 20 23:01:50 2006 +0000
     1.3 @@ -595,7 +595,7 @@ void __cpuinit cpu_gdt_init(struct Xgt_d
     1.4  void __cpuinit cpu_init(void)
     1.5  {
     1.6  	int cpu = smp_processor_id();
     1.7 -#ifdef CONFIG_DOUBLEFAULT
     1.8 +#ifndef CONFIG_X86_NO_TSS
     1.9  	struct tss_struct * t = &per_cpu(init_tss, cpu);
    1.10  #endif
    1.11  	struct thread_struct *thread = &current->thread;
     2.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h	Mon Feb 20 20:26:24 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h	Mon Feb 20 23:01:50 2006 +0000
     2.3 @@ -503,15 +503,19 @@ struct thread_struct {
     2.4  	.io_bitmap	= { [ 0 ... IO_BITMAP_LONGS] = ~0 },		\
     2.5  }
     2.6  
     2.7 -static inline void load_esp0(struct tss_struct *tss, struct thread_struct *thread)
     2.8 +static inline void __load_esp0(struct tss_struct *tss, struct thread_struct *thread)
     2.9  {
    2.10  	tss->esp0 = thread->esp0;
    2.11 +#ifdef CONFIG_X86_SYSENTER
    2.12  	/* This can only happen when SEP is enabled, no need to test "SEP"arately */
    2.13  	if (unlikely(tss->ss1 != thread->sysenter_cs)) {
    2.14  		tss->ss1 = thread->sysenter_cs;
    2.15  		wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
    2.16  	}
    2.17 +#endif
    2.18  }
    2.19 +#define load_esp0(tss, thread) \
    2.20 +	__load_esp0(tss, thread)
    2.21  #else
    2.22  #define load_esp0(tss, thread) \
    2.23  	HYPERVISOR_stack_switch(__KERNEL_DS, (thread)->esp0)