[PATCH 3/3] x86: verify_cpu: restore flags later

From: Alexey Dobriyan
Date: Thu May 17 2018 - 16:37:14 EST


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@xxxxxxxxx>
---

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)