mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
Move lgdt_finish inline
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
This commit is contained in:
1 parent
c0bb7d27dc
commit
3d7e20748b
3 files changed
+13
-17
No files matched your search
@@ -583,7 +583,19 @@ void __cpuinit cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
|
||||
}
|
||||
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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -77,19 +77,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
|
||||
|
||||
# boot GDT descriptor (later on used by CPU#0):
|
||||
|
||||
@@ -61,9 +61,6 @@ void xen_cpu_idle (void);
|
||||
/* 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 */
|
||||
/*
|
||||
* NB. ptr values should be PHYSICAL, not MACHINE. 'vals' should be already
|
||||
|
||||