From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932885AbcFGXne (ORCPT ); Tue, 7 Jun 2016 19:43:34 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45990 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751699AbcFGXnc (ORCPT ); Tue, 7 Jun 2016 19:43:32 -0400 Date: Tue, 7 Jun 2016 16:43:23 -0700 From: "tip-bot for H. Peter Anvin" Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, hpa@linux.intel.com Reply-To: hpa@linux.intel.com, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <1465342269-492350-11-git-send-email-hpa@linux.intel.com> References: <1465342269-492350-11-git-send-email-hpa@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86, asm, boot: Use CC_SET()/CC_OUT() in arch/x86/boot/boot.h Git-Commit-ID: 8d0d5a8abd88fa9671867b8b8ab4ee61b85c0c81 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8d0d5a8abd88fa9671867b8b8ab4ee61b85c0c81 Gitweb: http://git.kernel.org/tip/8d0d5a8abd88fa9671867b8b8ab4ee61b85c0c81 Author: H. Peter Anvin AuthorDate: Tue, 7 Jun 2016 16:31:09 -0700 Committer: H. Peter Anvin CommitDate: Tue, 7 Jun 2016 16:36:42 -0700 x86, asm, boot: Use CC_SET()/CC_OUT() in arch/x86/boot/boot.h Remove open-coded uses of set instructions to use CC_SET()/CC_OUT() in arch/x86/boot/boot.h. Signed-off-by: H. Peter Anvin Link: http://lkml.kernel.org/r/1465342269-492350-11-git-send-email-hpa@linux.intel.com --- arch/x86/boot/boot.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 2edb2d5..7c1495f 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "bitops.h" #include "ctype.h" #include "cpuflags.h" @@ -179,15 +180,15 @@ static inline void wrgs32(u32 v, addr_t addr) static inline bool memcmp_fs(const void *s1, addr_t s2, size_t len) { bool diff; - asm volatile("fs; repe; cmpsb; setnz %0" - : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); + asm volatile("fs; repe; cmpsb" CC_SET(nz) + : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; } static inline bool memcmp_gs(const void *s1, addr_t s2, size_t len) { bool diff; - asm volatile("gs; repe; cmpsb; setnz %0" - : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); + asm volatile("gs; repe; cmpsb" CC_SET(nz) + : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; }