From nobody Mon Feb 9 17:06:42 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1570039342; cv=none; d=zoho.com; s=zohoarc; b=nTzJyHveXU00X6eaA7oDpC4TYBkJDDLevtsOTIW/FKUujrWBDLhnNu77L1GrqatK57Sv4MTmJa9yE72//dL+eAOqR5pzYnzc3qx8SMQal5hmXnthPYZG60i1T+HNNhstSfn+Zk9ZudBQwo/dqprCbVuy5gzBV4L3GjNYE4DJfps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570039342; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=KVZmn7SDfQQdhwQQQ2O/cqdFiWbqxjIISULSRoRRFt8=; b=W9J7jt/oU5wt/83b+SM22I1zHbjnwY/Qr7ejf9DNdJXJmg78d+WxcGIBZCqIqeRpjxwzESML6BxWnGyjTUVWJ0RcWZj/StPQAaH7VnwfWPTan5U8zcEvkQqcaZSTsO70zz2ZqGLYusc5GjR8c6yp13qDoC7pSim8+xlHC/qvy8s= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1570039342396792.6556976166415; Wed, 2 Oct 2019 11:02:22 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iFivw-0005JZ-D5; Wed, 02 Oct 2019 18:01:04 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iFivv-0005JI-4i for xen-devel@lists.xenproject.org; Wed, 02 Oct 2019 18:01:03 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 949eefe6-e53e-11e9-971c-12813bfff9fa; Wed, 02 Oct 2019 18:00:55 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 68F3E15A2; Wed, 2 Oct 2019 11:00:55 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F5693F706; Wed, 2 Oct 2019 11:00:54 -0700 (PDT) X-Inumbo-ID: 949eefe6-e53e-11e9-971c-12813bfff9fa From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 2 Oct 2019 19:00:44 +0100 Message-Id: <20191002180047.17144-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191002180047.17144-1-julien.grall@arm.com> References: <20191002180047.17144-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.13 3/6] xen/arm: cpuerrata: Match register size with value size in check_workaround_* X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Artem_Mygaiev@epam.com, Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Julien Grall MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The asm statement expects a 32-bit (resp. 64-bit) value on Arm32 (resp. Arm64) whereas the value is a boolean (Clang consider to be 32-bit). It would be possible to impose 32-bit register for both architecture but this require the code to use __OP32. However, it does not really improve the assembly generated. Instead, replace switch the variable to use register_t. Signed-off-by: Julien Grall --- Changes in v2: - Use !! per Stefano's request --- xen/include/asm-arm/cpuerrata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/include/asm-arm/cpuerrat= a.h index 55ddfda272..0896fe6e25 100644 --- a/xen/include/asm-arm/cpuerrata.h +++ b/xen/include/asm-arm/cpuerrata.h @@ -14,14 +14,14 @@ static inline bool check_workaround_##erratum(void) = \ return false; \ else \ { \ - bool ret; \ + register_t ret; \ \ asm volatile (ALTERNATIVE("mov %0, #0", \ "mov %0, #1", \ feature) \ : "=3Dr" (ret)); \ \ - return unlikely(ret); \ + return unlikely(!!ret); \ } \ } =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel