Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19062934rwd; Wed, 28 Jun 2023 04:43:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gGhkrTiDlVk4npk2XBNSlPSZWbHv4dIgWHtEkTaNtry0SKHfyuGdB0NTX8OOr+ZQ+cSQS X-Received: by 2002:a05:6a20:4320:b0:116:d935:f74b with SMTP id h32-20020a056a20432000b00116d935f74bmr1523713pzk.10.1687952611491; Wed, 28 Jun 2023 04:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687952611; cv=none; d=google.com; s=arc-20160816; b=iZywO3krZiA5oH5bfiLcGLn9w0PLupsGgmCweUVF6GkE8c3Xd7cSn4pj76uGNG4lRU rtmGV/zbc7/dveq7+ZMlK/1IhnmRw6rfHkSV6oRU9Ib2co84H0IE6dxEFSAwrWDCK00L t8FfHnrBxUloXcBC8yRG/mcyu0XqpM9eQx7Bf4e9O0R7PrS/Vh8MbrtW/HFHCVC1cjZ8 lMf/9pt8nfd8NrY+UD3o4RnRt0NJyexW7q0m5AdaFEAvKuNO9iOKDzMb3+sOTGUvIQ7m S1rctEekOiQuBxviDiLXldEZNCoz+ix80W29JindbWz2BAKXIT/Fhsf774YEodN8i+6n FjSA== 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=WPS8EgVmsuYKLwB/yZyqAD3qQxEAVrUEUVm4/Bk6ZlA=; fh=Ht5uC6T3oebCMMiHU4VYiR4Ev97CJlW5kvOYo/2wGi4=; b=goQXNPN1jLoeesGu/7yKY190oY9TXj/slfKAMJ9Rwk8oc5zj9rHMC5GbUxqNt2jlJw 8hcZy2WvdbdRevXLRoMS1Sd2LoSpWmGWxq0guoAZpbMiBAZFtoX1gU996DNAbg96M46x 2HRPihlvSM7MsNLtvZ0Zx4fViILHftOcVXb/UxlWbDVNgEcnwwSo0+M/82kIPbje9PfQ VayisJIlVT+eQkTM5K9z21BOJcbu8FlYpEbj7J60SW5eV/envpGokxcD61O4IS9oHGo6 0U83u3IUIbTMgYjBmbYRonRvK15AcRRbgaIJTmDfmdJjZVhytWNmORPYbGV+W+Kk8Mh3 UdxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=f45a2Vvg; 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 201-20020a6300d2000000b0055acc7f8097si7077350pga.364.2023.06.28.04.43.19; Wed, 28 Jun 2023 04:43:31 -0700 (PDT) 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=f45a2Vvg; 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 S231523AbjF1LKp (ORCPT + 99 others); Wed, 28 Jun 2023 07:10:45 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:41143 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbjF1LKn (ORCPT ); Wed, 28 Jun 2023 07:10:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1687950643; x=1719486643; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WPS8EgVmsuYKLwB/yZyqAD3qQxEAVrUEUVm4/Bk6ZlA=; b=f45a2Vvg/1SqoCWNNeIkz+r8cjxjgWIMLkTKxWYwiUV2yjN7+2VqFxaE XJ8XlwYINPRCclNKIgNtS08A4P7lUbUDIR/ARJT2iCA9VCHv8gXtHzv4s k/mMBc1fUAIbCYfMSPIy9BH0YO7Ult2+EeGPS8jPrRWkNhcrgPJp4ujhY a4ShgZrAoB4WvfnnsVmytASiw96d+3eBuBbvL6cLXB+u8sCB+QyEQ6SDe bzGNYi2Ytlxl+dj6l3wGaiZ+lvKCxyJM1R7eMpEWKtPML/f7mJclbe3Ti 87JEe7TQ0/dg60k3G5/jD6faJnhRk/0msNA+pZxT8nkMiaix814tUk4XW Q==; X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="asc'?scan'208";a="220273292" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2023 04:10:43 -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.21; Wed, 28 Jun 2023 04:10:42 -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.21 via Frontend Transport; Wed, 28 Jun 2023 04:10:39 -0700 Date: Wed, 28 Jun 2023 12:10:11 +0100 From: Conor Dooley To: Samuel Ortiz CC: Conor Dooley , Evan Green , Paul Walmsley , Palmer Dabbelt , Albert Ou , , "Hongren (Zenithal) Zheng" , , Andrew Jones , Heiko Stuebner , Anup Patel , , Guo Ren , Atish Patra , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Jiatai He Subject: Re: [PATCH 1/3] RISC-V: add Bitmanip/Scalar Crypto parsing from DT Message-ID: <20230628-unfeeling-tavern-edd4f58396fa@wendy> References: <20230627143747.1599218-1-sameo@rivosinc.com> <20230627143747.1599218-2-sameo@rivosinc.com> <20230627-debating-twelve-da2c1ed60948@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YhMMrLi4maVY432h" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --YhMMrLi4maVY432h Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 28, 2023 at 12:01:11PM +0200, Samuel Ortiz wrote: > On Tue, Jun 27, 2023 at 07:48:15PM +0100, Conor Dooley wrote: > > On Tue, Jun 27, 2023 at 11:14:30AM -0700, Evan Green wrote: > > > On Tue, Jun 27, 2023 at 7:38=E2=80=AFAM Samuel Ortiz wrote: > > > It would be nice to consolidate the ones together that search for a > > > single string and set multiple bits, though I don't have any super > > > elegant ideas for how off the top of my head. > >=20 > > I've got a refactor of this code in progress, dropping all of these > > copy-paste in place of a loop. It certainly looks more elegant than > > this, but it will fall over a bit for these "one string matches many > > extensions" cases. See here: > > https://patchwork.kernel.org/project/linux-riscv/patch/20230626-thievin= g-jockstrap-d35d20b535c5@wendy/ > > My immediate thought is to add another element to riscv_isa_ext_data, > > that contains "parent" extensions to check for. Should be fairly doable, > > I'll whip something up on top of that... >=20 > Nice, and thanks for the review. > Should I wait for your refactor to be merged before pushing this one? I don't know. I think that you should continue on with your series here, and whichever goes in second gets rebased on top of the other. I don't think it makes material difference to review of this patchset as to whether you rebase on top of what I'm working on, so I wouldn't bother until it gets merged. Rather hacky, had less time than expected this morning: https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/commit/?h= =3Driscv-extensions-strings-supersets Clearly there's issues with looping to RISCV_ISA_MAX_SUPERSETS & I just repurposed Zicsr for the sake of testing something in the time I had. Evan, at a high level, does that look more elegant to you, or have I made things worse? --YhMMrLi4maVY432h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZJwVEwAKCRB4tDGHoIJi 0odBAQCGhQC04g5NX1UwATx7PJIFcjSsuRX6bdBayXqjTHuUqwEA1YlIzLiAh68e R4OeRtEOFZOGNesu9GAsfbgm0Zx4DgE= =iWeD -----END PGP SIGNATURE----- --YhMMrLi4maVY432h--