mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86-64: slightly shorten int_ret_from_sys_call
@ 2011-11-29 10:54 Jan Beulich
  2011-12-05 18:00 ` [tip:x86/asm] x86-64: Slightly " tip-bot for Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2011-11-29 10:54 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: linux-kernel

Testing for a return to ring 0 was necessary here solely because of the
branch out of ret_from_fork. That branch, however, can be directed to
retint_restore_args, and thus the test-and-branch can be eliminated
here.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

---
 arch/x86/kernel/entry_64.S |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- 3.2-rc3/arch/x86/kernel/entry_64.S
+++ 3.2-rc3-x86_64-entry-iret-from-syscall/arch/x86/kernel/entry_64.S
@@ -411,7 +411,7 @@ ENTRY(ret_from_fork)
 	RESTORE_REST
 
 	testl $3, CS-ARGOFFSET(%rsp)		# from kernel_thread?
-	je   int_ret_from_sys_call
+	jz   retint_restore_args
 
 	testl $_TIF_IA32, TI_flags(%rcx)	# 32-bit compat task needs IRET
 	jnz  int_ret_from_sys_call
@@ -612,8 +612,6 @@ tracesys:
 GLOBAL(int_ret_from_sys_call)
 	DISABLE_INTERRUPTS(CLBR_NONE)
 	TRACE_IRQS_OFF
-	testl $3,CS-ARGOFFSET(%rsp)
-	je retint_restore_args
 	movl $_TIF_ALLWORK_MASK,%edi
 	/* edi:	mask to check */
 GLOBAL(int_with_check)




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

end of thread, other threads:[~2011-12-05 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-29 10:54 [PATCH] x86-64: slightly shorten int_ret_from_sys_call Jan Beulich
2011-12-05 18:00 ` [tip:x86/asm] x86-64: Slightly " tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome