]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/entry/entry_64_compat.S
x86/xen/64: Rearrange the SYSCALL entries
[linux.git] / arch / x86 / entry / entry_64_compat.S
index e1721dafbcb13fab9230cc20d598b18ebef8306b..5314d7b8e5ad4d8b2a1dff24b4e53efb132ced07 100644 (file)
@@ -183,21 +183,20 @@ ENDPROC(entry_SYSENTER_compat)
  */
 ENTRY(entry_SYSCALL_compat)
        /* Interrupts are off on entry. */
-       SWAPGS_UNSAFE_STACK
+       swapgs
 
        /* Stash user ESP and switch to the kernel stack. */
        movl    %esp, %r8d
        movq    PER_CPU_VAR(cpu_current_top_of_stack), %rsp
 
-       /* Zero-extending 32-bit regs, do not remove */
-       movl    %eax, %eax
-
        /* Construct struct pt_regs on stack */
        pushq   $__USER32_DS            /* pt_regs->ss */
        pushq   %r8                     /* pt_regs->sp */
        pushq   %r11                    /* pt_regs->flags */
        pushq   $__USER32_CS            /* pt_regs->cs */
        pushq   %rcx                    /* pt_regs->ip */
+GLOBAL(entry_SYSCALL_compat_after_hwframe)
+       movl    %eax, %eax              /* discard orig_ax high bits */
        pushq   %rax                    /* pt_regs->orig_ax */
        pushq   %rdi                    /* pt_regs->di */
        pushq   %rsi                    /* pt_regs->si */