From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424145AbcFHTj2 (ORCPT ); Wed, 8 Jun 2016 15:39:28 -0400 Received: from mga01.intel.com ([192.55.52.88]:61083 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424035AbcFHTjM (ORCPT ); Wed, 8 Jun 2016 15:39:12 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,440,1459839600"; d="scan'208";a="998050613" From: "H. Peter Anvin" To: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Linux Kernel Mailing List Cc: Andy Lutomirski , Borislav Petkov , "H. Peter Anvin" Subject: [PATCH v2 09/10] x86, asm, boot: Use CC_SET()/CC_OUT() in arch/x86/boot/boot.h Date: Wed, 8 Jun 2016 12:38:45 -0700 Message-Id: <1465414726-197858-10-git-send-email-hpa@linux.intel.com> X-Mailer: git-send-email 2.7.3.0.11.gd79db92 In-Reply-To: <1465414726-197858-1-git-send-email-hpa@linux.intel.com> References: <1465414726-197858-1-git-send-email-hpa@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Andy Lutomirski Reviewed-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) --- 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; } -- 2.7.3.0.11.gd79db92