[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170426183405.GD5069@avx2>
Date: Wed, 26 Apr 2017 21:34:05 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: x86@...nel.org, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Cc: linux-kernel@...r.kernel.org, bp@...e.de
Subject: [PATCH 4/5] x86_64: clobber "cc" in inlined clear_page()
Both REP variants clobber flags because of "xor eax, eax" instructions.
While they can be changed to "mov eax, 0", generic version probably
can not because it has to do comparison at some point.
And it is kind of not worth it to not clobber flags anyway.
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
arch/x86/include/asm/page_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/include/asm/page_64.h
+++ b/arch/x86/include/asm/page_64.h
@@ -46,7 +46,7 @@ static inline void clear_page(void *page)
clear_page_rep_stosb, X86_FEATURE_ERMS,
"=D" (page),
"0" (page)
- : "memory", "rax", "rcx");
+ : "cc", "memory", "rax", "rcx");
}
void copy_page_mov(void *to, void *from);
Powered by blists - more mailing lists