x86/asm/entry/64: Minor cleanup of conditional compilation
Subsystems (2)
PATCH 1/1 x86/asm/entry/64: Minor cleanup of conditional compilation
The entry_SYSCALL_64_fastpath was checking the value of __SYSCALL_MASK, which in turn was being set in arch/x86/include/asm/unistd.h depending on whether CONFIG_X86_X32_ABI was set or not. This made the intention a bit cryptic.
Juggle the code around so that the conditional compilation depends on the value of CONFIG_X86_X32_ABI
--- arch/x86/entry/entry_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/entry/entry_64.S +3 -3
@@ -175,11 +175,11 @@ GLOBAL(entry_SYSCALL_64_after_swapgs) testl $_TIF_WORK_SYSCALL_ENTRY, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS) jnz tracesys entry_SYSCALL_64_fastpath: -#if __SYSCALL_MASK == ~0 - cmpq $__NR_syscall_max, %rax -#else +#ifdef CONFIG_X86_X32_ABI andl $__SYSCALL_MASK, %eax cmpl $__NR_syscall_max, %eax +#else + cmpq $__NR_syscall_max, %rax #endif ja 1f /* return -ENOSYS (already in pt_regs->ax) */ movq %r10, %rcx
Signature · 1 line
2.1.4