Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jan Beulich and committed by
Ingo Molnar
2f63b9db 2bf557ea

+2 -8
+2 -8
arch/x86/kernel/entry_64.S
··· 615 615 testb $3, CS(%rsp) 616 616 jz retint_kernel 617 617 /* Interrupt came from user space */ 618 - 618 + retint_user: 619 619 GET_THREAD_INFO(%rcx) 620 620 /* 621 621 * %rcx: thread info. Interrupts off. ··· 1194 1194 RESTORE_EXTRA_REGS 1195 1195 DISABLE_INTERRUPTS(CLBR_NONE) 1196 1196 TRACE_IRQS_OFF 1197 - GET_THREAD_INFO(%rcx) 1198 1197 testl %eax,%eax 1199 1198 jnz retint_kernel 1200 - LOCKDEP_SYS_EXIT_IRQ 1201 - movl TI_flags(%rcx),%edx 1202 - movl $_TIF_WORK_MASK,%edi 1203 - andl %edi,%edx 1204 - jnz retint_careful 1205 - jmp retint_swapgs 1199 + jmp retint_user 1206 1200 END(error_exit) 1207 1201 1208 1202 /* Runs on exception stack */