Commit 2f63b9db authored by Jan Beulich's avatar Jan Beulich Committed by Ingo Molnar

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: default avatarJan 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 2bf557ea
...@@ -615,7 +615,7 @@ ret_from_intr: ...@@ -615,7 +615,7 @@ ret_from_intr:
testb $3, CS(%rsp) testb $3, CS(%rsp)
jz retint_kernel jz retint_kernel
/* Interrupt came from user space */ /* Interrupt came from user space */
retint_user:
GET_THREAD_INFO(%rcx) GET_THREAD_INFO(%rcx)
/* /*
* %rcx: thread info. Interrupts off. * %rcx: thread info. Interrupts off.
...@@ -1194,15 +1194,9 @@ ENTRY(error_exit) ...@@ -1194,15 +1194,9 @@ ENTRY(error_exit)
RESTORE_EXTRA_REGS RESTORE_EXTRA_REGS
DISABLE_INTERRUPTS(CLBR_NONE) DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF TRACE_IRQS_OFF
GET_THREAD_INFO(%rcx)
testl %eax,%eax testl %eax,%eax
jnz retint_kernel jnz retint_kernel
LOCKDEP_SYS_EXIT_IRQ jmp retint_user
movl TI_flags(%rcx),%edx
movl $_TIF_WORK_MASK,%edi
andl %edi,%edx
jnz retint_careful
jmp retint_swapgs
END(error_exit) END(error_exit)
/* Runs on exception stack */ /* Runs on exception stack */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment