Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9205507rwb; Thu, 24 Nov 2022 09:23:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf44tI1gVajQo7oTwbD73t3KvjBcg1rcSN3C0LwXOaLf/ghelQQtpzHarYkyRiZXK98uh0YN X-Received: by 2002:a05:6402:3893:b0:461:b033:90ac with SMTP id fd19-20020a056402389300b00461b03390acmr19248590edb.257.1669310618654; Thu, 24 Nov 2022 09:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669310618; cv=none; d=google.com; s=arc-20160816; b=FT2XZ13vurG/Zzlysh/kQ3t3JSMgl5j71udBOTynvpomW6obA2l/ypYFBlXiRsyzib 2IcEqQW7OyDfuFs4GMceF0uMvMssJB0EWN1Xe1m6OLh5Z5Cw+RtL+mNiPC5Vkb1sKZdz 0vyT2R6KiII6uQiwdvSU8TsL4Sl6zscMNyHWXY4Nll49Dcg30CMpXfSJEt3i/Y9S+LS0 AjnJON5UvCW1HE/VuWnUJ66wDRNaVcuobvQOVJw+p7UMX72qeazx12P8OgE+tU+K+du4 7WoLuqB9SlnSTZHxsgZGlwLqFFlAqdeEem08v26FUmqtfOU68n+cjlMoi+CNMlOtPQUC 2WNQ== 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=E/WsFYZRX1AeNR+4gh8Ss2sIErXOewqR12PDDkr/27w=; b=qiRcH0I+u4tQzSQu/9CTsYzwOfePAJpz9pTIeJ/63doO7kGaXJ8zn7aTx++KbkkmLq G8qHOGGqCECKA6rCIrDmDY1isMXqEmTlmSaZKuphaHavzIqVT6M1sRNTmo0IoiybHsue ycD7hD2MC4dVATDb85XkyYAvfdrbvgdlPkCH/TMU1GuoVtqPImWXr74ST4NPypTaCyws 2Y+vn2nrcDBYXp+fuYVM0YrKe03fPmleavRJa5b9q9dB40DgHJHlaQ4FbQtkWUshwSxS XBz+kPrmLA6r7fQhKEhWgdK6IrvwMpVnynQyrYfgyhFeLLOpVzqRTz/w3URRK6HHu5uq FbdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vacYD0NQ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt20-20020a170907729400b007ae814af68dsi1571871ejc.355.2022.11.24.09.23.17; Thu, 24 Nov 2022 09:23:38 -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=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=vacYD0NQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbiKXRMq (ORCPT + 86 others); Thu, 24 Nov 2022 12:12:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbiKXRMn (ORCPT ); Thu, 24 Nov 2022 12:12:43 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D6D49095 for ; Thu, 24 Nov 2022 09:12:41 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id cl5so3321000wrb.9 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=xAPSAc7UbIMnrGQCQsz1tu+2pxOFUyL9E6YzhUPutMYZSgkhbP140ZgDqYDmY1OmCA ZBN5EYLxZ040VwK8n7SB0HX0VkvtMaBd6bGqaj/dgMV/Nc0oXcphg1eP2hT3PmiRHOzB kOXQeF9zqD4FEX8V8tvdfW3b5LYoEPpZnIh9ljSXbjVKK90cp41//HvFKezk1+yre1sU CNGr+U4H0Rj1LgcypwKvyV5sqXYsl7/IhlsH9cr0tpGTIq8/neDHKAMt7XDRf6LRZ6ps cfLByj5iKdefhbYzj28MeFuEzyU1RtVk4j4pDPgB+idOnnoyX10qUBe4mipIm3Tj6Pbp FxZA== X-Gm-Message-State: ANoB5pknXnOIkz6UAPlrtvUdbbzaR1ZTX32FYX1rjXfd+P/ICu3jFr5l WmmKO+6xI2atc8AOa4qyvTPBqQ== 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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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.