From: "Jan Beulich" <JBeulich@suse.com>
To: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>
Cc: <luto@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86-64/entry: fold identical code paths
Date: Mon, 01 Jun 2015 13:03:59 +0100 [thread overview]
Message-ID: <556C664F020000780007FB64@mail.emea.novell.com> (raw)
retint_kernel doesn't require %rcx to be pointing to thread info
(anymore?), and the code on the two alternative paths is - not really
surprisingly - identical.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
---
arch/x86/kernel/entry_64.S | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- 4.1-rc6/arch/x86/kernel/entry_64.S
+++ 4.1-rc6-x86_64-entry-fold-code/arch/x86/kernel/entry_64.S
@@ -744,7 +744,7 @@ ret_from_intr:
testl $3,CS(%rsp)
je retint_kernel
/* Interrupt came from user space */
-
+retint_user:
GET_THREAD_INFO(%rcx)
/*
* %rcx: thread info. Interrupts off.
@@ -1380,15 +1380,9 @@ ENTRY(error_exit)
RESTORE_EXTRA_REGS
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
- GET_THREAD_INFO(%rcx)
testl %eax,%eax
jne retint_kernel
- LOCKDEP_SYS_EXIT_IRQ
- movl TI_flags(%rcx),%edx
- movl $_TIF_WORK_MASK,%edi
- andl %edi,%edx
- jnz retint_careful
- jmp retint_swapgs
+ jmp retint_user
CFI_ENDPROC
END(error_exit)
next reply other threads:[~2015-06-01 12:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-01 12:03 Jan Beulich [this message]
2015-06-02 8:25 ` [tip:x86/asm] x86/asm/entry/64: Fold " tip-bot for Jan Beulich
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=556C664F020000780007FB64@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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®