linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/asm/entry/64: Tidy up JZ insns after TESTs
@ 2015-04-27 13:21 Denys Vlasenko
  2015-04-27 13:21 ` [PATCH 2/2] x86/asm/entry/64: Clean up usage of TEST insns Denys Vlasenko
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Denys Vlasenko @ 2015-04-27 13:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Denys Vlasenko, Linus Torvalds, Steven Rostedt, Borislav Petkov,
	H. Peter Anvin, Andy Lutomirski, Oleg Nesterov,
	Frederic Weisbecker, Alexei Starovoitov, Will Drewry, Kees Cook,
	x86, linux-kernel

After TESTs, use logically correct JZ/JNZ mnemonics instead of JE/JNE.
This doesn't change code.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Ingo Molnar <mingo@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andy Lutomirski <luto@amacapital.net>
CC: Oleg Nesterov <oleg@redhat.com>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Alexei Starovoitov <ast@plumgrid.com>
CC: Will Drewry <wad@chromium.org>
CC: Kees Cook <keescook@chromium.org>
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
---
 arch/x86/kernel/entry_64.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index e952f6b..8f8b22a 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -666,7 +666,7 @@ END(irq_entries_start)
 	leaq -RBP(%rsp),%rdi	/* arg1 for \func (pointer to pt_regs) */
 
 	testl $3, CS-RBP(%rsp)
-	je 1f
+	jz	1f
 	SWAPGS
 1:
 	/*
@@ -721,7 +721,7 @@ ret_from_intr:
 	CFI_ADJUST_CFA_OFFSET	RBP
 
 	testl $3,CS(%rsp)
-	je retint_kernel
+	jz	retint_kernel
 	/* Interrupt came from user space */
 
 	GET_THREAD_INFO(%rcx)
@@ -1310,7 +1310,7 @@ ENTRY(error_entry)
 	SAVE_EXTRA_REGS 8
 	xorl %ebx,%ebx
 	testl $3,CS+8(%rsp)
-	je error_kernelspace
+	jz	error_kernelspace
 error_swapgs:
 	SWAPGS
 error_sti:
@@ -1361,7 +1361,7 @@ ENTRY(error_exit)
 	TRACE_IRQS_OFF
 	GET_THREAD_INFO(%rcx)
 	testl %eax,%eax
-	jne retint_kernel
+	jnz retint_kernel
 	LOCKDEP_SYS_EXIT_IRQ
 	movl TI_flags(%rcx),%edx
 	movl $_TIF_WORK_MASK,%edi
-- 
1.8.1.4


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

end of thread, other threads:[~2015-05-08  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 13:21 [PATCH 1/2] x86/asm/entry/64: Tidy up JZ insns after TESTs Denys Vlasenko
2015-04-27 13:21 ` [PATCH 2/2] x86/asm/entry/64: Clean up usage of TEST insns Denys Vlasenko
2015-05-08  9:25   ` [tip:x86/asm] " tip-bot for Denys Vlasenko
2015-04-27 21:13 ` [PATCH 1/2] x86/asm/entry/64: Tidy up JZ insns after TESTs Andy Lutomirski
2015-04-27 22:16 ` H. Peter Anvin
2015-04-28 10:05   ` Denys Vlasenko
2015-05-08  9:25 ` [tip:x86/asm] " tip-bot for Denys Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).