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 61488C4332F for ; Thu, 24 Nov 2022 17:20:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbiKXRUq (ORCPT ); Thu, 24 Nov 2022 12:20:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiKXRUq (ORCPT ); Thu, 24 Nov 2022 12:20:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBA9442FD; Thu, 24 Nov 2022 09:20:45 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id C272CB8289C; Thu, 24 Nov 2022 17:20:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FAC8C433D6; Thu, 24 Nov 2022 17:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669310442; bh=JB9qZrrqFpGk0H4HPOvs80vQdLVw7i9EscGuUefH0pw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Te3QID+ipAkEEoYZvSJdkNSnHQLGbt/iXdSeIexqtPiAqge3n6lTbM2ez8F36oWo9 DAUB8gGiDWzKTPCw0LKE+8IdQtJyYPR6F4WuWze3SACJkk0tzk86X5ZsDiauQpwqD4 kbVAnWlfJUU1+YXSkluKcG2D/8z+wjQFa/jh0RRk28slpFQxcvIGPkl9Hu8pTVbnmy lUUyeN4W5MdWVUjGFCqsbj7nRB3JgOQNheBDhTtitp0a/jGv4gVkpLwtlfFc4Nkgci siyIVR5zSFU//GHaxH4ABmzrZZAQ24Z4jhfbypnJ6L23LyTmmLVlYaT6okfkTh2/AW R7wakXTCE3pWw== Message-ID: Date: Thu, 24 Nov 2022 17:20:37 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3 2/3] RISC-V: uapi: add HWCAP for Bitmanip/Scalar Crypto To: Samuel Ortiz Cc: "Hongren (Zenithal) Zheng" , Palmer Dabbelt , Paul Walmsley , Albert Ou , Atish Patra , Anup Patel , Eric Biederman , Kees Cook , linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Michael Kerrisk , linux-man@vger.kernel.org, Jiatai He , Heiko Stuebner References: Content-Language: en-US From: Conor Dooley In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On 24/11/2022 17:12, Samuel Ortiz wrote: > [You don't often get email from sameo@rivosinc.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On Thu, Nov 24, 2022 at 11:55:01AM +0000, Conor Dooley wrote: >> On Thu, Nov 24, 2022 at 11:47:30AM +0100, Samuel Ortiz wrote: >> >>> Patch #1 is definitely needed regardless of which interface we pick for >>> exposing the ISA strings to userspace. >> >> I took another look at #1, and I feel more confused about what >> constitutes canonical order than I did before! If you know better than >> I, and you probably do since you're interested in these 6 month old >> patches, some insight would be appreciated! > > Assuming we don't go with hwcap, I dont think the order of the > riscv_isa_ext_id enum matters that much? The chief put it in canonical order so that's good enough for me! > > iiuc we're building the cpuinfo string from the riscv_isa_ext_data > array, and I think the current code is incorrect: > > static struct riscv_isa_ext_data isa_ext_arr[] = { > __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF), > __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC), > __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), > __RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT), > __RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM), > __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), > __RISCV_ISA_EXT_DATA("", RISCV_ISA_EXT_MAX), > }; > > zicbom and zihintpause should come before supervisor level extensions. > I'm going to send a patch for that. idk, Palmer explicitly re-ordered this: https://lore.kernel.org/linux-riscv/20220920204518.10988-1-palmer@rivosinc.com/ By my reading of the isa manual, what Palmer did is correct as those are not "Additional Standard Extensions". /shrug > > And the Zb/Zk ones should come after the Zi ones, and before the > supervisor level ones (The I category comes before the B or the K one). This I agree with though.