Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp413676rdb; Sat, 27 Jan 2024 11:52:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE523KmRgqa+dgFk6acBSNsYlyzjKPzaMZx+PySnVcHryMVUHY0vW6FgJJXG3frHNypogHK X-Received: by 2002:a05:6a20:8424:b0:19c:7ee6:d15 with SMTP id c36-20020a056a20842400b0019c7ee60d15mr2704600pzd.47.1706385127033; Sat, 27 Jan 2024 11:52:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706385127; cv=pass; d=google.com; s=arc-20160816; b=MwjimGjL70yZ0J5n6/9W+Cs2A/oVDY4r/NOy/0sfjtTGNHBS+o3XWzQNwibFO7dXNu xNXMg0a/ohJJK2oJcgPiUjwQ9sSG7leWm9DLuCDXQdzzWJD9XWD+yFkHUdlcrXndo9xa fz1xEw6z5a15aSW3vdO2MsqWavIznJXF4JT5Q3P1AgZZTqyUXCRMnydIvDzFkXpPR+di +lwWLDlfLRw7K7zxgrS+ton83fx24pQAI43KqHV4jhL/yDrRBSoXIWlx2lvZCfyujA+G BFnc2b+QqBR1dRwHBPJRIwESgxWTFD9ddspQRkOx8skWfl9LiellNc+4ExlnCAlntE2m 8MmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UnDc3IsaSNN9EhDJ4QpuoPw0/upyUkEuo4heROiLad8=; fh=oxRBsV6R9Y2YSPd0Wah0HH+xbjS7sIG43pKpQDLc6xg=; b=evzJgu0DAy0Z84gHRa02KtPGEN64fgIkXv4FhIbIlQeTFc3uZszX+9pn3fsa/qqsaT rxCEBbK+TW0n8RX2gct9HyTMPeMbtAuXe/RLbYjZU5fHJzxjhKh7XeymSn7z5qmBuQ/c adMetJus9hrvZdXqoU0XVr9Enf7Hw8guZiLcj1aR+ctWmXbk8mUqZIHJPF68eeIKnqkI nnSj93ySyd/mFlDDUcnaVD8k6pUkeu/MfUSGCINKofbPhsvrSNaJdN4HzOOhsk5RJSGH OP1ZqVfZspS8qkKriYCSOJ7jVBt3xzN3VjgxxX0vGFpue8VPFaNHEZpsrSHQfvEIvwT4 zxFg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="JhQ7Z/Wp"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1703-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 g13-20020a62e30d000000b006dde34f547csi3238863pfh.179.2024.01.27.11.52.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 11:52:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1703-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="JhQ7Z/Wp"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1703-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 ADEF6282270 for ; Sat, 27 Jan 2024 19:52:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79BA72E62E; Sat, 27 Jan 2024 19:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JhQ7Z/Wp" 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 3434A2C86A; Sat, 27 Jan 2024 19:52:02 +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=1706385123; cv=none; b=Gtsg7ELq9ckerXVgaOXlahd1HCx9koZM5KhPBG7mOxNpWmL3Rno32LtsPKvBc9zVuXZO8Jkxs5B1OvCMP1h6DgCcjx+Hv4KAvsyds/LQ9LxtF7nz/beIJcjSkTnDbvEOKdQulcA+RFbUhAhTxYRnluNiISbGk+qPS34X5Qln/eY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706385123; c=relaxed/simple; bh=nNNOg9OGw4VfRgQPR3+oq9lPYHSxhSiGjos34RuwKwg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AJMCdH9aR4uDlHQgXS3IWfeNqH9vdc/EgukYCwGtHPgPquzz0lR1etQJw+fxmbe//W2oE7czNI8eV6hDL2w5kihNmZK5vcUrvoKNlpGsHoQK1udTmjbjAlHYEMU6uCS3IWtHQIQ7lD6WynoBoxUMyyL7sQ5ZRc++x/ctTcND9M4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JhQ7Z/Wp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5234DC433C7; Sat, 27 Jan 2024 19:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706385122; bh=nNNOg9OGw4VfRgQPR3+oq9lPYHSxhSiGjos34RuwKwg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JhQ7Z/WpfC6u+Gt7BEU5AzxNheIqn1BiZynbNIvhZE2FqnHPvbc9p0C0TY0Kt6trZ uuATYufIzZBJipqarY5MYAgq/cwRUWrbhoqlBKr5ZPGk29orVU74ch4vQPO0j6Spmj 0/EMdTrcqzUM7GvLCFm9aJsC8bsE6qd1klm2rVNQ9zxhbW7V9xFwMflAXU7DspfmBY 9gnD2qDIjkwBKrPNlLNDPFnAENURqVvIY71wyRCnkGbNJvcZIXmHhMdkmndmIPenuI HjyT+v+N9yioOd4aSR0VPfJ8wtNRmBb833PMPp0eXhsO9PD9lBdD2Cf968NQJ8p6a9 6dgxtErdKbqyA== Date: Sat, 27 Jan 2024 12:52:00 -0700 From: Nathan Chancellor To: Eric Biggers Cc: linux-riscv@lists.infradead.org, linux-crypto@vger.kernel.org, llvm@lists.linux.dev, Brandon Wu Subject: Re: [PATCH] RISC-V: fix check for zvkb with tip-of-tree clang Message-ID: <20240127195200.GA781164@dev-arch.thelio-3990X> References: <20240127090055.124336-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240127090055.124336-1-ebiggers@kernel.org> On Sat, Jan 27, 2024 at 01:00:54AM -0800, Eric Biggers wrote: > 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 Reviewed-by: Nathan Chancellor I also verified this does not regress GCC. > --- > 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 >