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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 392DEC4332F for ; Thu, 24 Nov 2022 17:12:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83DB86B0072; Thu, 24 Nov 2022 12:12:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C6EB6B0073; Thu, 24 Nov 2022 12:12:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6403A6B0074; Thu, 24 Nov 2022 12:12:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 51AAF6B0072 for ; Thu, 24 Nov 2022 12:12:42 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F30ADAAD2A for ; Thu, 24 Nov 2022 17:12:41 +0000 (UTC) X-FDA: 80168980164.04.D3BF4C4 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by imf10.hostedemail.com (Postfix) with ESMTP id 7C21FC000A for ; Thu, 24 Nov 2022 17:12:41 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id g12so3304731wrs.10 for ; Thu, 24 Nov 2022 09:12:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=E/WsFYZRX1AeNR+4gh8Ss2sIErXOewqR12PDDkr/27w=; b=vacYD0NQanWjuA3GOSjTYVZDBMGvfmF6Vd904OJHK9xcny70dfoX+cUOp7d6mejteg YO9NR4cjc28uDp/GqopCEMys2azE+iluRicx11RgU4nLC/RuWcAOK/yZIrJYHYkFXgSk 7+Ig+KgaSF0c9G+v77P1qUvuk74Qwmq3CfMOXlVVOp8pXXnpnsZnM2cjDyyNiVC/aeug yE4ZycTnCAJ1QWBWeyI63GW1BggJOXMNZG0/vb3Yn9SbI4kcj3ffT4B1rwJNWUpmmInP d8E3XF9mS3Pn7qPQn+TadLMYt6w+QjQCx1Zr+S41tOU0RohrnaPpNllIqrshfs6gTZrC 1lEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=E/WsFYZRX1AeNR+4gh8Ss2sIErXOewqR12PDDkr/27w=; b=jbklJbISsehYIdMCLb+S0hfd+YY10WNTUsPp2qeuNsCDNQ/JnExvH3RaVMPa9ydXt7 WRJF4rXMcVQ5xkXWt7hg9cgAWkgh1wpDzSfW6KnsH3mmlLjkYEEUcbwOxxNsaDZsjtnc lGU7RguDdRrc1ALzT3gsh8aOhTPwCwOvEsOWMKPvLYYc0HKS39kKNtJlDINpMkQw/bXW e1ruEp/9T62pqFvk8BT4G+LBcptee+dHyEpPAyK+K8Gla5blEF5SvzMuUWAZTvOzQ1AL 70ep8wTZg4j1BtIM8m62eRUDri+6yy9QkSLCLWx+yb13rZ6pxWNOrCiqEanE5DdaYajw oiRg== X-Gm-Message-State: ANoB5plDChWT9qxICe/LDnGbofyDIJ4/qJnrqoDGBJzUe8pIC4qo488E XCZ0qOuMlv3+lvRhMBCuF6Ty9g== X-Google-Smtp-Source: AA0mqf4EkcQPK/TpqP3c+qIXAMQp7K3u644h34Pd4fKfm/kHZIk0PLwVnfI5L6Hmb2D87tZnsQYcxQ== X-Received: by 2002:a05:6000:156e:b0:241:cbe9:78a9 with SMTP id 14-20020a056000156e00b00241cbe978a9mr14665805wrz.529.1669309960015; Thu, 24 Nov 2022 09:12:40 -0800 (PST) Received: from vermeer ([145.224.92.100]) by smtp.gmail.com with ESMTPSA id n9-20020a5d4849000000b00228692033dcsm1750909wrs.91.2022.11.24.09.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 09:12:39 -0800 (PST) Date: Thu, 24 Nov 2022 18:12:36 +0100 From: Samuel Ortiz To: Conor Dooley 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 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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669309961; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=E/WsFYZRX1AeNR+4gh8Ss2sIErXOewqR12PDDkr/27w=; b=GN4qPr6VWXxcDmTP1z1s0KemaVWCqww5FUHGBaFxDpP/ufufn6Ui9izT53AryDf3B98ERT fpvNb1KL8wYRNMRZUdzOMX9Ipvn+8+sqYjbIKXtZ25F0p4tXmwxJgudsv4kWWOKXu4yymC faUbG6+FWkN7eFaoLu5W2xEpWGqvP4c= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vacYD0NQ; spf=pass (imf10.hostedemail.com: domain of sameo@rivosinc.com designates 209.85.221.53 as permitted sender) smtp.mailfrom=sameo@rivosinc.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669309961; a=rsa-sha256; cv=none; b=14j8IMjb2uLeNsVOXNOjRDkFDz12WOmimMQfvgJpAuHFIKSAg6Qkm8KTvdCEcxUWqEbk1z g75vOnMHxZ4TWqc8rcKBkGnC7YldNKhxoHiAi9PXKn5s76QG8GMD0eENcsDE26s5yMHN+6 zIshhtnRpfY+FY1EzHjrcsStUW9kVFY= X-Rspamd-Queue-Id: 7C21FC000A Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vacYD0NQ; spf=pass (imf10.hostedemail.com: domain of sameo@rivosinc.com designates 209.85.221.53 as permitted sender) smtp.mailfrom=sameo@rivosinc.com; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: mrya86qxoq3zpbrf8t5g7ftommtbjpig X-HE-Tag: 1669309961-561468 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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? 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. 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). So we should check that when patch #1 is rebased. Cheers, Samuel.