Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2054199imm; Thu, 2 Aug 2018 05:36:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpef2e9oivxdVEtZybxjWGIYDCUNTSorC8lUwrd2c51T9DXXHEnApniOO0J0XmhBlPfUOis2 X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr2267218plo.81.1533213402661; Thu, 02 Aug 2018 05:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533213402; cv=none; d=google.com; s=arc-20160816; b=AYDkXg9rYN16dVy6mLjmya6C9knX+LMapGzawvrTIcz/CiJn+0qxcI5qysrrCqpMOY GGmZf70nXIoDehMza1H/dL2XGXy2DeE+nQ9vJ5VS/XwTvP/PeK1oUrtmur8eOUi+R1Ut R1MCohWIGKzMKAQh/UjwkELI2wt1JxvM7kWRJXLYAO0fXM4Wv6SZYRuKrsj59oHKDrGn VKu5qz/Pt38py/QYdiNCkbdK0BLoWAoiN9EWe5NRyQT8Essp8NGUI6NL7Dp1Mf6YCNh0 g3V8qFNvgm6B7u+U97EnYq4j4gATg2MgJJxV6RAPxo0I5VpNvvBYaalDY6L+dC+W6OoQ PdJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=KwaTXf7ib/tzW+TDw2WhQGWwekm65IAvbZKclZE/waA=; b=g9j7XD1O8syAsH2/zY8ayX1tcOxNugj6n1Hptj8YUfqVU3XrHCRShqn45EtLCvwQ1z M6Q3j05dvgQVZrwOTwN6id/OEtzzG6LcezSGuC/Oy1jHXjzfilP1Ci2kK0SUxpN0OpFp 0KV58bdvxgCnNaxNBDVKFAtd3vLUsrSgF6b5poKL0IG5hrn+fz/4tXPFSCZZ8NNlayas Xt6eyxS+d4NpZLrQDnyYP73aaD4XNpgdrClnzx72071dgr38LJ6U8YVU5cPKbYXhvjMi QxOgo0hpyhzyFf1ALWs+85a/rk1lXMKWruAJXViRacrOYFZrkw04OpTwn2FJfa4p00kT Vbzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30-v6si1332357pla.110.2018.08.02.05.36.28; Thu, 02 Aug 2018 05:36:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387443AbeHBOYz (ORCPT + 99 others); Thu, 2 Aug 2018 10:24:55 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60223 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387404AbeHBOYy (ORCPT ); Thu, 2 Aug 2018 10:24:54 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w72CXpV23500584 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Aug 2018 05:33:51 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w72CXpV03500581; Thu, 2 Aug 2018 05:33:51 -0700 Date: Thu, 2 Aug 2018 05:33:51 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Uros Bizjak Message-ID: Cc: tglx@linutronix.de, ubizjak@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com Reply-To: mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, ubizjak@gmail.com In-Reply-To: <20180629142844.15200-1-ubizjak@gmail.com> References: <20180629142844.15200-1-ubizjak@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] x86/boot: Use CC_SET()/CC_OUT() instead of open coding it Git-Commit-ID: 216a37202f10b7d78f2f98e26a6681f367165f05 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 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 216a37202f10b7d78f2f98e26a6681f367165f05 Gitweb: https://git.kernel.org/tip/216a37202f10b7d78f2f98e26a6681f367165f05 Author: Uros Bizjak AuthorDate: Fri, 29 Jun 2018 16:28:44 +0200 Committer: Thomas Gleixner CommitDate: Thu, 2 Aug 2018 14:30:42 +0200 x86/boot: Use CC_SET()/CC_OUT() instead of open coding it Remove open-coded uses of set instructions with CC_SET()/CC_OUT(). Signed-off-by: Uros Bizjak Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20180629142844.15200-1-ubizjak@gmail.com --- arch/x86/boot/bitops.h | 3 ++- arch/x86/boot/string.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h index 0d41d68131cc..2e1382486e91 100644 --- a/arch/x86/boot/bitops.h +++ b/arch/x86/boot/bitops.h @@ -17,6 +17,7 @@ #define _LINUX_BITOPS_H /* Inhibit inclusion of */ #include +#include static inline bool constant_test_bit(int nr, const void *addr) { @@ -28,7 +29,7 @@ static inline bool variable_test_bit(int nr, const void *addr) bool v; const u32 *p = (const u32 *)addr; - asm("btl %2,%1; setc %0" : "=qm" (v) : "m" (*p), "Ir" (nr)); + asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr)); return v; } diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c index 16f49123d747..c4428a176973 100644 --- a/arch/x86/boot/string.c +++ b/arch/x86/boot/string.c @@ -13,6 +13,7 @@ */ #include +#include #include "ctype.h" #include "string.h" @@ -28,8 +29,8 @@ int memcmp(const void *s1, const void *s2, size_t len) { bool diff; - asm("repe; cmpsb; setnz %0" - : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); + asm("repe; cmpsb" CC_SET(nz) + : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; }