All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64/entry: fold identical code paths
@ 2015-06-01 12:03 Jan Beulich
  2015-06-02  8:25 ` [tip:x86/asm] x86/asm/entry/64: Fold " tip-bot for Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2015-06-01 12:03 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: luto, linux-kernel

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)
 




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/asm] x86/asm/entry/64: Fold identical code paths
  2015-06-01 12:03 [PATCH] x86-64/entry: fold identical code paths Jan Beulich
@ 2015-06-02  8:25 ` tip-bot for Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Jan Beulich @ 2015-06-02  8:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: dvlasenk, jbeulich, brgerst, luto, hpa, mingo, bp, JBeulich,
	peterz, torvalds, luto, linux-kernel, tglx

Commit-ID:  2f63b9db7260beba3c19d66d6c11b0b78ea84a8c
Gitweb:     http://git.kernel.org/tip/2f63b9db7260beba3c19d66d6c11b0b78ea84a8c
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Mon, 1 Jun 2015 13:03:59 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 2 Jun 2015 10:10:09 +0200

x86/asm/entry/64: Fold identical code paths

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@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/556C664F020000780007FB64@mail.emea.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/entry_64.S | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index b84cec5..4ad79e9 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -615,7 +615,7 @@ ret_from_intr:
 	testb	$3, CS(%rsp)
 	jz	retint_kernel
 	/* Interrupt came from user space */
-
+retint_user:
 	GET_THREAD_INFO(%rcx)
 	/*
 	 * %rcx: thread info. Interrupts off.
@@ -1194,15 +1194,9 @@ ENTRY(error_exit)
 	RESTORE_EXTRA_REGS
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
-	GET_THREAD_INFO(%rcx)
 	testl %eax,%eax
 	jnz 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
 END(error_exit)
 
 /* Runs on exception stack */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-02  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 12:03 [PATCH] x86-64/entry: fold identical code paths Jan Beulich
2015-06-02  8:25 ` [tip:x86/asm] x86/asm/entry/64: Fold " tip-bot for Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.