From: Nikolay Borisov <nikolay.b.borisov@gmail.com>
To: mingo@kernel.org
Cc: hpa@zytor.com, dvlasenk@redhat.com, luto@amacapital.net,
linux-kernel@vger.kernel.org, bp@suse.de,
Nikolay Borisov <nikolay.b.borisov@gmail.com>
Subject: [PATCH v2] x86/asm/entry/64: Minor cleanup of conditional compilation
Date: Sat, 5 Sep 2015 23:53:43 +0300 [thread overview]
Message-ID: <1441486423-6997-1-git-send-email-nikolay.b.borisov@gmail.com> (raw)
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
Signed-off-by: Nikolay Borisov <nikolay.b.borisov@gmail.com>
---
Sending v2 as I had forgotten to add my signed-off-by line.
arch/x86/entry/entry_64.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 8cb3e43..b0177f9 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -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
--
2.1.4
next reply other threads:[~2015-09-05 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-05 20:53 Nikolay Borisov [this message]
2015-09-06 6:03 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441486423-6997-1-git-send-email-nikolay.b.borisov@gmail.com \
--to=nikolay.b.borisov@gmail.com \
--cc=bp@suse.de \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®