From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CFA5C7EE2F for ; Mon, 12 Jun 2023 21:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236433AbjFLVb3 (ORCPT ); Mon, 12 Jun 2023 17:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232251AbjFLVbX (ORCPT ); Mon, 12 Jun 2023 17:31:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7379D90; Mon, 12 Jun 2023 14:31:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10B3E62CC5; Mon, 12 Jun 2023 21:31:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F9D9C433EF; Mon, 12 Jun 2023 21:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686605479; bh=O9RBysrUumVN/DTH5e2pJQMxqAPMNksXtgzMomVPQAs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DmU9zIQCMdF5nTt+08NLNJUXuyfYyOZr60Wfs6HioS/Wj3V9W3oOZx41ecaV3uYiI gZyNX8Jgv3DukOR+bbxpUH2MZ/2FHcUbXlP/zbhrZ9HdaFyzhVU9CR7aHkpyriVG1V PtLvXDxGfRk5KAaQ/vilfaTd3VzghS0eNluO+3qkb5FNogWphZxi/Y/V23VVqEXbsr TBcXcD4Z0zSD09WtBaiTvx7qXn/Y5bee9COAoGe4UJtwJvmKmRDarB+8Yq8EevXnf4 /Ybg8z/13LTqg/x/F/QIRe+6BXAlVtbbX2iK+j4y4Ox2yB4mEXdehgEVxNgvOoPAiI 83KAr4EMfZoqQ== Date: Mon, 12 Jun 2023 22:31:14 +0100 From: Conor Dooley To: Heiko Stuebner Cc: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, herbert@gondor.apana.org.au, davem@davemloft.net, conor.dooley@microchip.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, christoph.muellner@vrull.eu, Heiko Stuebner Subject: Re: [PATCH v5 1/4] RISC-V: add Zbc extension detection Message-ID: <20230612-unstable-tilt-1835f84363b1@spud> References: <20230612210442.1805962-1-heiko.stuebner@vrull.eu> <20230612210442.1805962-2-heiko.stuebner@vrull.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UWhf0UVrM2ZeKQ9k" Content-Disposition: inline In-Reply-To: <20230612210442.1805962-2-heiko.stuebner@vrull.eu> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org --UWhf0UVrM2ZeKQ9k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Heiko, On Mon, Jun 12, 2023 at 11:04:39PM +0200, Heiko Stuebner wrote: > From: Heiko Stuebner >=20 > Add handling for Zbc extension. >=20 > Zbc provides instruction for carry-less multiplication. >=20 > Signed-off-by: Heiko Stuebner > --- > arch/riscv/Kconfig | 22 ++++++++++++++++++++++ > arch/riscv/include/asm/hwcap.h | 1 + > arch/riscv/kernel/cpu.c | 1 + > arch/riscv/kernel/cpufeature.c | 1 + > 4 files changed, 25 insertions(+) Plumbing into the hwprobe stuff would be nice, but that's not a requirement for getting stuff merged :) > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a3d54cd14fca..754cd154eca5 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -523,6 +523,28 @@ config RISCV_ISA_ZBB > =20 > If you don't know what to do here, say Y. > =20 > +config TOOLCHAIN_HAS_ZBC > + bool > + default y > + depends on !64BIT || $(cc-option,-mabi=3Dlp64 -march=3Drv64ima_zbc) > + depends on !32BIT || $(cc-option,-mabi=3Dilp32 -march=3Drv32ima_zbc) > + depends on LLD_VERSION >=3D 150000 || LD_VERSION >=3D 23900 > + depends on AS_IS_GNU > + > +config RISCV_ISA_ZBC > + bool "Zbc extension support for bit manipulation instructions" > + depends on TOOLCHAIN_HAS_ZBC > + depends on !XIP_KERNEL && MMU > + default y > + help > + Adds support to dynamically detect the presence of the ZBC Nit: s/ZBC/Zbc/ Reviewed-by: Conor Dooley Cheers, Conor. --UWhf0UVrM2ZeKQ9k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZIeOogAKCRB4tDGHoIJi 0tpIAQCV/FZ+x6SOlWpZAMOONuMlLShKsDnc2kMiK0ixTAKecwEAkLKsrJ8vMbbV MwLaqeQ8ZaHFMuCiBvp57j+/D951AA8= =pn8b -----END PGP SIGNATURE----- --UWhf0UVrM2ZeKQ9k--