# HG changeset patch
# User Ian.Campbell@xxxxxxxxxxxxx
# Node ID f06f8c9a13d1f6ffcdf0d395eb6cf30f66fd51fe
# Parent 32a74fa9e221fa6e60ec150fab8e74d7a4494f04
Move lgdt_finish inline
Signed-off-by: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
diff -r 32a74fa9e221 -r f06f8c9a13d1
linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c Wed Feb 22
15:16:44 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c Wed Feb 22
15:17:04 2006
@@ -583,7 +583,19 @@
}
if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
BUG();
- lgdt_finish();
+
+ /* Reload all the segment registers after changing gdt. */
+ asm volatile("movl %0,%%ss\n\t"
+ "movl %1,%%ds\n\t"
+ "movl %1,%%es\n\t"
+ "pushl %2\n\t" /* Reload CS by intersegment
return. */
+ "pushl $1f\n\t"
+ "lret\n\t"
+ "1:\n\t"
+ : /* no outputs */
+ : "r"(__KERNEL_DS),
+ "r"(__USER_DS),
+ "r"(__KERNEL_CS));
}
/*
diff -r 32a74fa9e221 -r f06f8c9a13d1
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S Wed Feb 22 15:16:44 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S Wed Feb 22 15:17:04 2006
@@ -76,19 +76,6 @@
L6:
jmp L6 # main should never return here, but
# just in case, we know what happens.
-
-ENTRY(lgdt_finish)
- movl $(__KERNEL_DS),%eax # reload all the segment registers
- movw %ax,%ss # after changing gdt.
-
- movl $(__USER_DS),%eax # DS/ES contains default USER segment
- movw %ax,%ds
- movw %ax,%es
-
- popl %eax # reload CS by intersegment return
- pushl $(__KERNEL_CS)
- pushl %eax
- lret
ALIGN
diff -r 32a74fa9e221 -r f06f8c9a13d1
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h Wed Feb
22 15:16:44 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h Wed Feb
22 15:17:04 2006
@@ -60,9 +60,6 @@
/* arch/xen/i386/kernel/hypervisor.c */
void do_hypervisor_callback(struct pt_regs *regs);
-
-/* arch/xen/i386/kernel/head.S */
-void lgdt_finish(void);
/* arch/xen/i386/mm/hypervisor.c */
/*
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|