From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935957AbdDZSeS (ORCPT ); Wed, 26 Apr 2017 14:34:18 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33393 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935775AbdDZSeK (ORCPT ); Wed, 26 Apr 2017 14:34:10 -0400 Date: Wed, 26 Apr 2017 21:34:05 +0300 From: Alexey Dobriyan To: x86@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Cc: linux-kernel@vger.kernel.org, bp@suse.de Subject: [PATCH 4/5] x86_64: clobber "cc" in inlined clear_page() Message-ID: <20170426183405.GD5069@avx2> References: <20170426182318.GA5069@avx2> <20170426182806.GB5069@avx2> <20170426183047.GC5069@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170426183047.GC5069@avx2> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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);