x86-64: Slightly shorten int_ret_from_sys_call
authorJan Beulich <[email protected]>
Tue, 29 Nov 2011 10:54:22 +0000 (10:54 +0000)
committerIngo Molnar <[email protected]>
Mon, 5 Dec 2011 16:24:37 +0000 (17:24 +0100)
Testing for a return to ring 0 was necessary here solely because
of the branch out of ret_from_fork. That branch, however, can be
directed to retint_restore_args, and thus the test-and-branch
can be eliminated here.

Signed-off-by: Jan Beulich <[email protected]>
Reviewed-by: Andi Kleen <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/entry_64.S

index faf8d5e74b0be311198f74dabd88293587d06025..ab4b7ffd526d31fa222f8b389f2704fac1203d25 100644 (file)
@@ -411,7 +411,7 @@ ENTRY(ret_from_fork)
        RESTORE_REST
 
        testl $3, CS-ARGOFFSET(%rsp)            # from kernel_thread?
-       je   int_ret_from_sys_call
+       jz   retint_restore_args
 
        testl $_TIF_IA32, TI_flags(%rcx)        # 32-bit compat task needs IRET
        jnz  int_ret_from_sys_call
@@ -612,8 +612,6 @@ tracesys:
 GLOBAL(int_ret_from_sys_call)
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF
-       testl $3,CS-ARGOFFSET(%rsp)
-       je retint_restore_args
        movl $_TIF_ALLWORK_MASK,%edi
        /* edi: mask to check */
 GLOBAL(int_with_check)