From: Alexey Dobriyan <adobriyan@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] x86: verify_cpu: restore flags later
Date: Fri, 18 May 2018 00:33:43 +0300 [thread overview]
Message-ID: <20180517213343.GC4047@avx2> (raw)
popf
xor eax, eax
formally doesn't restore flags because XOR clobber flags.
Do POPF as last instruction and rearrange the other case for symmetry.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/x86/kernel/verify_cpu.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/verify_cpu.S
+++ b/arch/x86/kernel/verify_cpu.S
@@ -132,11 +132,11 @@ ENTRY(verify_cpu)
jmp .Lverify_cpu_sse_test # try again
.Lverify_cpu_no_longmode:
- popf # Restore caller passed flags
movl $1,%eax
+ popf # Restore caller passed flags
ret
.Lverify_cpu_sse_ok:
- popf # Restore caller passed flags
xorl %eax, %eax
+ popf # Restore caller passed flags
ret
ENDPROC(verify_cpu)
reply other threads:[~2018-05-17 21:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180517213343.GC4047@avx2 \
--to=adobriyan@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).