Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8641351rwb; Thu, 24 Nov 2022 02:16:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4WiMj/4gETnX+vKVqvmb+o8DVtfI8+Vm9zTsRFg+mppd/L0Yq9tsWGGGrapnxTuT0C0XAe X-Received: by 2002:a17:903:4111:b0:189:596a:1499 with SMTP id r17-20020a170903411100b00189596a1499mr2525859pld.157.1669284967573; Thu, 24 Nov 2022 02:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669284967; cv=none; d=google.com; s=arc-20160816; b=IAbhNzHk3SjZCPTrW3ejrwxq15xsSPpnLLpz5aAoaF1X0HNrfsufCYFWX2axXaMiwY IYnBBYiRwIcS8NZ2fxJ3M+o4SbyNhz4X87k0OWej3qJlyc2RoR1xuIdCBrl2B86qHxz/ OzA+vG3nL6TqgqkhCAtDPD47eEdpK8Di2HaeHscXDf1Db8JxZn4rDwJxm3mS1dB62R+p CDZ/OUZo190teCGf5barPFOXWqTQSnFxu389lFlZfjpJ9dgJNLkuQuM0tcIRvKiL9lRO p32le9zW+KLZdRDQ/QwYw8VISHg4KdV9PD0Umd6hDZKa4RLh2jO0thjp6Qp8odjkBMa3 UjfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/UMaFR7JEYb8lCQk2whBxNNujSIVKrGlX25DXswDlPU=; b=Sh6U4YQ2PyUncV9jYmAdHHdjc0zh9NvCRSW8f7DN+TOTiU+wfl908iNF5WFrCFB8bE cnRbeyNgVrKxAcqSa9HGxcWiCd1ZtE6WoLiQ0ue1u75mW/EXwRkLIiahRpPO3HVPVS9H 6MhEWamtsrsB6rVEmGb8QpuUOn/S1QrqpzF0hJ5p7tG0ukMo0QlM6DdZ89QmU5fa0aGl 8peIZu8i7zcXkx66ws1Lqm4aStQ1TCVrq33HD62sR6yurTUq1jAifBoinXivF7p2ue+O hQFihPhIB7I5XnHd7B1WIUjCbclc8Gmh1/d7SMYn1uSE8qp+NXJlb7wzjZsbQI/kouO6 z/Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=R8wTkFVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc3-20020a170902930300b0018930d070bdsi654978plb.72.2022.11.24.02.15.51; Thu, 24 Nov 2022 02:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=R8wTkFVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbiKXJ7g (ORCPT + 87 others); Thu, 24 Nov 2022 04:59:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbiKXJ7W (ORCPT ); Thu, 24 Nov 2022 04:59:22 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381822F3B1; Thu, 24 Nov 2022 01:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1669283959; x=1700819959; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Vwfci9L8RiCJZJk4q1ZcbZBshRi/h91hw6qStmAse7s=; b=R8wTkFVnyKs8yYs/1DkEDVEwUUZoqM2JI4jRSCyL7GCHN59+UPnr5AJE f0+3ot8ixHiMxpGK5Z7UkJdNq8wBi330TKxFRNQxa6K/Dtzds3ZIvGFGF hGUJZ/Ler3MhuFOyxXYXkvsKkx4Z20Q6imSDW5YQukO0XimO/VRUxv3j6 5UIDu5P55hVNDCh8G4nvDc+FrgjiNPRXzpJ8lyb0QuxSoi7QcRiBrindr /x8ctYURQq7C0hnDzbKrsBGE5Jt6hkGSZ5kBCgcD8Vzq2FMp0SIo7bpGC ekhkmOw2kPZbpBEsx42GL2I4HsLm9duoFnK+jXoHv8ee+oQ+MAg7KctoY g==; X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="188489524" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Nov 2022 02:59:18 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 24 Nov 2022 02:59:14 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12 via Frontend Transport; Thu, 24 Nov 2022 02:59:11 -0700 Date: Thu, 24 Nov 2022 09:58:53 +0000 From: Conor Dooley To: Samuel Ortiz CC: "Hongren (Zenithal) Zheng" , Palmer Dabbelt , Paul Walmsley , Albert Ou , Atish Patra , Anup Patel , Eric Biederman , Kees Cook , , , , , Michael Kerrisk , , Jiatai He , Heiko Stuebner Subject: Re: [PATCH v3 2/3] RISC-V: uapi: add HWCAP for Bitmanip/Scalar Crypto Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 24, 2022 at 10:30:21AM +0100, Samuel Ortiz wrote: > On Mon, Jun 13, 2022 at 02:46:35AM +0800, Hongren (Zenithal) Zheng wrote: > > diff --git a/arch/riscv/include/uapi/asm/hwcap.h b/arch/riscv/include/uapi/asm/hwcap.h > > index 46dc3f5ee99f..bfed3e5c338c 100644 > > --- a/arch/riscv/include/uapi/asm/hwcap.h > > +++ b/arch/riscv/include/uapi/asm/hwcap.h > > @@ -22,4 +22,26 @@ > > #define COMPAT_HWCAP_ISA_D (1 << ('D' - 'A')) > > #define COMPAT_HWCAP_ISA_C (1 << ('C' - 'A')) > > > > +/* > > + * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2 > > + * > > + * As only 32 bits of elf_hwcap (in kernel) could be used > > + * and RISC-V has reserved 26 bits of it, other caps like > > + * bitmanip and crypto can not be placed in AT_HWCAP > > + */ > > Have we agreed that multi-letter ISA extensions would use hwcap to be > exposed to userspace? With so many potential extensions, we could > quickly run out of space on AT_HWCAP2 as well. Palmer whipped up a PoC hwprobe interface (during Plumbers I think) that Heiko is currently looking into - I think his motivation is misaligned access performance. There's a branch but I have no idea if it even compiles... I'm mostly waiting for whatever Heiko comes up with ;) https://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git/log/?h=riscv-hwprobe-v1 This patchset seems to need a rebase anyway per your other reply, but I guess that the new proposed interface would be preferable? Thanks, Conor.