Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727763 > unrolled thread

[RFC 07/17] x86/asm/64: Merge the fast and slow SYSRET paths

Started byAndy Lutomirski <luto@kernel.org>
First post2017-09-06 23:40 +0200
Last post2017-09-06 23:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 07/17] x86/asm/64: Merge the fast and slow SYSRET paths Andy Lutomirski <luto@kernel.org> - 2017-09-06 23:40 +0200

#1727763 — [RFC 07/17] x86/asm/64: Merge the fast and slow SYSRET paths

FromAndy Lutomirski <luto@kernel.org>
Date2017-09-06 23:40 +0200
Subject[RFC 07/17] x86/asm/64: Merge the fast and slow SYSRET paths
Message-ID<umQdd-7qi-31@gated-at.bofh.it>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 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 45d4cb8fd81b..a9e318f7cc9b 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -216,9 +216,8 @@ entry_SYSCALL_64_fastpath:
 	TRACE_IRQS_ON		/* user mode is traced as IRQs on */
 	movq	RIP(%rsp), %rcx
 	movq	EFLAGS(%rsp), %r11
-	RESTORE_C_REGS_EXCEPT_RCX_R11
-	movq	RSP(%rsp), %rsp
-	USERGS_SYSRET64
+	addq	$6*8, %rsp
+	jmp	.Lpop_c_regs_and_sysret
 
 1:
 	/*
@@ -309,6 +308,7 @@ return_from_SYSCALL_64:
 syscall_return_via_sysret:
 	/* rcx and r11 are already restored (see code above) */
 	POP_EXTRA_REGS
+.Lpop_c_regs_and_sysret:
 	popq	%rsi	/* skip r11 */
 	popq	%r10
 	popq	%r9
-- 
2.13.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web