ia64/xen-unstable

changeset 8962:f06f8c9a13d1

Move lgdt_finish inline

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
author Ian.Campbell@xensource.com
date Wed Feb 22 15:17:04 2006 +0000 (2006-02-22)
parents 32a74fa9e221
children ed274ca1fbb7
files linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c	Wed Feb 22 15:16:44 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c	Wed Feb 22 15:17:04 2006 +0000
     1.3 @@ -583,7 +583,19 @@ void __cpuinit cpu_gdt_init(struct Xgt_d
     1.4  	}
     1.5  	if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
     1.6  		BUG();
     1.7 -	lgdt_finish();
     1.8 +
     1.9 +	/* Reload all the segment registers after changing gdt. */
    1.10 +	asm volatile("movl %0,%%ss\n\t"
    1.11 +		     "movl %1,%%ds\n\t"
    1.12 +		     "movl %1,%%es\n\t"
    1.13 +		     "pushl %2\n\t"		/* Reload CS by intersegment return. */
    1.14 +		     "pushl $1f\n\t"
    1.15 +		     "lret\n\t"
    1.16 +		     "1:\n\t"
    1.17 +		     : /* no outputs */
    1.18 +		     : "r"(__KERNEL_DS),
    1.19 +		       "r"(__USER_DS),
    1.20 +		       "r"(__KERNEL_CS));
    1.21  }
    1.22  
    1.23  /*
     2.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Wed Feb 22 15:16:44 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Wed Feb 22 15:17:04 2006 +0000
     2.3 @@ -77,19 +77,6 @@ L6:
     2.4  	jmp L6			# main should never return here, but
     2.5  				# just in case, we know what happens.
     2.6  
     2.7 -ENTRY(lgdt_finish)
     2.8 -	movl $(__KERNEL_DS),%eax	# reload all the segment registers
     2.9 -	movw %ax,%ss			# after changing gdt.
    2.10 -
    2.11 -	movl $(__USER_DS),%eax		# DS/ES contains default USER segment
    2.12 -	movw %ax,%ds
    2.13 -	movw %ax,%es
    2.14 -
    2.15 -	popl %eax			# reload CS by intersegment return
    2.16 -	pushl $(__KERNEL_CS)
    2.17 -	pushl %eax
    2.18 -	lret
    2.19 -
    2.20  	ALIGN
    2.21  
    2.22  # boot GDT descriptor (later on used by CPU#0):
     3.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Wed Feb 22 15:16:44 2006 +0000
     3.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Wed Feb 22 15:17:04 2006 +0000
     3.3 @@ -61,9 +61,6 @@ void xen_cpu_idle (void);
     3.4  /* arch/xen/i386/kernel/hypervisor.c */
     3.5  void do_hypervisor_callback(struct pt_regs *regs);
     3.6  
     3.7 -/* arch/xen/i386/kernel/head.S */
     3.8 -void lgdt_finish(void);
     3.9 -
    3.10  /* arch/xen/i386/mm/hypervisor.c */
    3.11  /*
    3.12   * NB. ptr values should be PHYSICAL, not MACHINE. 'vals' should be already