Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp161881rdb; Sat, 27 Jan 2024 01:01:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDq6a8k1kl4MQWRKScwTKc7REnXt4KXClpZo8a8gHB0QsY1ogIyYN13QlVzIdhvUaxc4wd X-Received: by 2002:a05:6358:2611:b0:176:c47b:7ef5 with SMTP id l17-20020a056358261100b00176c47b7ef5mr1649839rwc.4.1706346088985; Sat, 27 Jan 2024 01:01:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706346088; cv=pass; d=google.com; s=arc-20160816; b=V+JbT1cncuzvPGc/e1VWCDwh5JvrpCc6g0QmkZVLmmlq9wm0JLhPtVTuUV8NItoiWa TgV9xje8V3cray1/35r4NYMhD3yul9N0aLaMUl+/K1dPeLQLk5G22ZlH2IWq2n+WGEf5 G9jsMgnQrr67G1g83MvJbtoodwh4KwMoex3FOzxQ2qmHt+b2oNWTiRxp4eP3OuKSxVA3 bKTrACLtDEpoxab1gvV9edMvz42vA8uGXfer9kZb6nNS1SZs3Xh5sLzPCbOy3291VE/s d18l/p9tKVhRbuyh59KFHCz3pktC/iiD39bLHakvCDb2W/pdeXdPI499R31IWKWpCYro ZTLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=9dijx3aH0zMY8KbKubhmVB3fhhwpkfs1fvu4JR9+9/A=; fh=JePrH0ZOKER+B9ImoHZi7B7KmS2mTS7UEhRWKHI0+Ig=; b=sAAVdmKgwB7MVX+2F0NlascaO47HEDnmE/Tn/mv43kR2Hhgc/Z8YPwHEnkZvzTpPbZ gC5xWdbkdCbwDf00jlr6o0LyDGtQGplDpgIOdXf/3sPSoPp7TPJdptJ4wc/JFsPZEA9P De3XipKpEg9eRdHdNsQyBGDanEvxue0ZvftzS2fEriZBTOxUOhCqNdnyPkZadi5HQ2kG re1nMnDGoCcUF0PyYcLb41W7jeMj2+7SBT26PaJdny8ygdgYVqRygCBadjODP6N67/6S hPWM16dsN+cqk2+7+71aBWbSPc1RnZJmfjQpwmtcA06SoOMv3r3AqHULL9FKMY6yOK+v s6SQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H68dCSkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fz3-20020a17090b024300b0029020beea5esi4522368pjb.48.2024.01.27.01.01.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 01:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H68dCSkY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1694-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 67975284866 for ; Sat, 27 Jan 2024 09:01:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31F6E1E872; Sat, 27 Jan 2024 09:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H68dCSkY" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD5FA7F; Sat, 27 Jan 2024 09:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706346084; cv=none; b=d0hwB7fXPiWNHCVRpklKI3/tICWf+EdBopwaNkYg4DMH9SSbTwgOjEecP02zY++Gn5c1WtMFtWW6WV0OKRGGGf8S92PAedxyDb6ki0obBx/2xL0f/GvpySybYuIGlheG0O505TqslwY4Fbnilz0PYZSyaW9VtQC8Y64/QOrwvH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706346084; c=relaxed/simple; bh=hpNFNF09+4R9C/NT6J2wtQJfi2pvjGg8peeFOWYXxjU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EGMxw4f1VmpcWHIlBTijqgYuQkQW8mp1cudzArBhm6gijuv6Rma5u6Pl3AqNN/C/g7aBa5AaoDDA/GbmOuwKxysEZTyKPgsP1BAnQ4P/cIBANQnomGG7S4N4y7Vr75Q5IxqbxSEvRJuLPdS6aqDALQTSem8YMkhA3/+nnCPP72o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H68dCSkY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37BCAC433F1; Sat, 27 Jan 2024 09:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706346083; bh=hpNFNF09+4R9C/NT6J2wtQJfi2pvjGg8peeFOWYXxjU=; h=From:To:Cc:Subject:Date:From; b=H68dCSkYteFymi0Fxr4ZLnTtDfhc3iBgtp7a90RfidyQYu69r1r6CihH13IS38xKA 7Y6lvWBv2gcFEyLZ7+znoLsJ18B01ysbSi7TqxpUNXJDjWLhRejbBDgMlFauFXh4ho PgX1lKteFbkEBIRK/boTZP8jxy8/KPzdwQ8qfbuK5SkmfjbayN6IDNPQrhOI0VvkMJ NGevEz43xgBNX1hKceUzic8Bw2t3RuDqq3ZNOQxH75u0u5SfE8UY/gIOE4ozUeGeuB LszLbDcljUQ2hOZ4ZAmeCkoYlvD5m4F4pw116jSOeoKtfeSDfZIdObP++x9JedU1FS k2tgGoKo1zjrQ== From: Eric Biggers To: linux-riscv@lists.infradead.org Cc: linux-crypto@vger.kernel.org, llvm@lists.linux.dev, Brandon Wu , Nathan Chancellor Subject: [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Date: Sat, 27 Jan 2024 01:00:54 -0800 Message-ID: <20240127090055.124336-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Eric Biggers LLVM commit 8e01042da9d3 ("[RISCV] Add missing dependency check for Zvkb (#79467)") broke the check used by the TOOLCHAIN_HAS_VECTOR_CRYPTO kconfig symbol because it made zvkb start depending on v or zve*. Fix this by specifying both v and zvkb when checking for support for zvkb. Signed-off-by: Eric Biggers --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index b49016bb5077b..912fff31492b9 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -581,21 +581,21 @@ config TOOLCHAIN_HAS_ZBB default y depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb) depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb) depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900 depends on AS_HAS_OPTION_ARCH # This symbol indicates that the toolchain supports all v1.0 vector crypto # extensions, including Zvk*, Zvbb, and Zvbc. LLVM added all of these at once. # binutils added all except Zvkb, then added Zvkb. So we just check for Zvkb. config TOOLCHAIN_HAS_VECTOR_CRYPTO - def_bool $(as-instr, .option arch$(comma) +zvkb) + def_bool $(as-instr, .option arch$(comma) +v$(comma) +zvkb) depends on AS_HAS_OPTION_ARCH config RISCV_ISA_ZBB bool "Zbb extension support for bit manipulation instructions" depends on TOOLCHAIN_HAS_ZBB depends on MMU depends on RISCV_ALTERNATIVE default y help Adds support to dynamically detect the presence of the ZBB base-commit: cb4ede926134a65bc3bf90ed58dace8451d7e759 -- 2.43.0