Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3397766rwo; Fri, 4 Aug 2023 04:28:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeSKKlErza1wuWyq6fJNSrSMl91hG30+I0sbQZPEAGaAiLBDRzAtRXxbnsCW2CnVM86DAi X-Received: by 2002:a17:906:c112:b0:988:8efc:54fa with SMTP id do18-20020a170906c11200b009888efc54famr1562792ejc.37.1691148509028; Fri, 04 Aug 2023 04:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691148509; cv=none; d=google.com; s=arc-20160816; b=jeH4UqO0ttN4gh7STPgx/M5AzlZZ6HDA2D99q2LQ9rLzhXg1t5G7xg6Z1HJ83YS8H9 iIkgsq1hOWRXQYlpx7wRVb8ekJPkhZzZ2A6nPCW2L/LIyj+sSn/CFk4D+E/pEAMJ7Mtk UoV8q87sG199s4rfjuT7c0s90s/T+4od9B7Is8A4X/3b+R8YAhrn6wuzeZKwjdMLl8Os Pq75yYB79zlNZM156mlNfqPHUykfAOXo4ylSAEK4jYYnIBx99AZavMf7QUDv+NmQl+Vd iI8kV6wNe/QUx0PAPprts5hqLw2S7PKC7jCQUOraux8eHeTesa0Mv5JA6hhayDmRzLGj b0cg== 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=5uZ6ctP41iHQ6HkipTho9UWSn5pkeva2/6S/eJSZ+jU=; fh=pEcIcgC3/ph7Ydy5Y7A133WGrFogGiBBj5jRsO2V1K8=; b=bvlTd9gCLNnby28mznbrN1yeD9r9hKGnaC6kj61eoHCVN+xQ1OzwEaH72eMGhK9+rF dNCfbyGx4kXARjLFI/tYdkKIJK63jP1Z4T7gR1Gwbbhw7Vv3BXOaz6eSjfLjPBZxTHyB icQ2OJOqqUC1usnuMTLzaER1MiAkZI1+L1WQcvVmwXfqODrUgEQP6T4tlbbN2XqPqOsN gaMtrWwg3pQyFG+BmslY3QGL/4LyVo2U8Auq13pQPg0DzqwRC14BeGn0x62QTSNtMQWF WTcoC9+Pash76pYBp4MNMwpcypvTqC5meh1jrFonoaGbggbRtFIwQsoocvyoOx6RhAyG +rag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=S9meV5hr; 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 p18-20020aa7d312000000b0051e26de2e9dsi497883edq.93.2023.08.04.04.28.03; Fri, 04 Aug 2023 04:28:29 -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=S9meV5hr; 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 S234327AbjHDIA0 (ORCPT + 99 others); Fri, 4 Aug 2023 04:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbjHDIAY (ORCPT ); Fri, 4 Aug 2023 04:00:24 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3BA1704; Fri, 4 Aug 2023 01:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1691136023; x=1722672023; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=mozKuYzJnKHA2aKr3eiYDtSGyCx3d+I7fkTRCyvB7W0=; b=S9meV5hrPUbBWAY9o6CBbP4zp+xjTUOqzEz4V6ZlpD8H2B8tHo8L1nwn J+cxYIHYcDIgWTY2rLLlG3UhfVIB554mdIApG5n6sVzQMbMid3158CjkH v/rNMykvOYsJ49x2MXBs1YjEVpZlQTA+Li9qoAZJVc86SfwWzIp/+RIHq C0o7scN3tX+VkKR/L+J5S+dFJK5K7cDvlqF3d42Pk4MR0XiKzXV6bm8hK W6ISf0f/5EQPsoIdmAlr3tcyz+F72jnKDnepDDHxGslQ76uyFlcoyIogo H8xoAXe/MiIZPQ1mhshb9FWdRwKYEmZwvCbhM0ZHqoAGTLBeefzP/VehU g==; X-IronPort-AV: E=Sophos;i="6.01,254,1684825200"; d="asc'?scan'208";a="164824311" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Aug 2023 01:00:21 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) 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; Fri, 4 Aug 2023 01:00:06 -0700 Received: from wendy (10.10.115.15) 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 via Frontend Transport; Fri, 4 Aug 2023 01:00:01 -0700 Date: Fri, 4 Aug 2023 08:59:24 +0100 From: Conor Dooley To: Charlie Jenkins CC: , , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Peter Zijlstra , Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Anup Patel , Atish Patra , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Luke Nelson , Xi Wang , Nam Cao Subject: Re: [PATCH 01/10] RISC-V: Expand instruction definitions Message-ID: <20230804-barterer-heritage-ed191081bc47@wendy> References: <20230803-master-refactor-instructions-v4-v1-0-2128e61fa4ff@rivosinc.com> <20230803-master-refactor-instructions-v4-v1-1-2128e61fa4ff@rivosinc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="giltLFM/xoeS/K8e" Content-Disposition: inline In-Reply-To: <20230803-master-refactor-instructions-v4-v1-1-2128e61fa4ff@rivosinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED 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 --giltLFM/xoeS/K8e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2023 at 07:10:26PM -0700, Charlie Jenkins wrote: > There are many systems across the kernel that rely on directly creating > and modifying instructions. In order to unify them, create shared > definitions for instructions and registers. >=20 > Signed-off-by: Charlie Jenkins > --- > arch/riscv/include/asm/insn.h | 2742 ++++++++++++++++++++++++= +++--- "I did a lot of copy-pasting from the RISC-V spec" How is anyone supposed to cross check this when there's 1000s of lines of a diff here? We've had some subtle bugs in some of the definitions in the past, so I would like to be able to check at this opportune moment that things are correct. > arch/riscv/include/asm/reg.h | 88 + > arch/riscv/kernel/kgdb.c | 4 +- > arch/riscv/kernel/probes/simulate-insn.c | 39 +- > arch/riscv/kernel/vector.c | 2 +- You need to at least split this up. I doubt a 2742 change diff for insn.h was required to make the changes in these 4 files. Then after that, it would be so much easier to reason about these changes if the additions to insn.h happened at the same time as the removals from the affected locations. I would probably split this so that things are done in more stages, with the larger patches split between changes that require no new definitions and changes that require moving things to insn.h > 5 files changed, 2629 insertions(+), 246 deletions(-) What you would want to see if this arrived in your inbox as a reviewer? Don't get me wrong, I do like what you are doing here, the BPF JIT especially is filled with "uhh okay, I guess those offsets are right", so I don't mean to be discouraging. Thanks, Conor. --giltLFM/xoeS/K8e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZMyvzwAKCRB4tDGHoIJi 0gQYAP0UlvSWYX6mB67CAGmIVZwnT0CwyiNPOEXW+G0t9GnWngD+PxdgtapB+DMY MPJ1zDp8mSYyzU+MKQ++56q8pPpFyQg= =yGw/ -----END PGP SIGNATURE----- --giltLFM/xoeS/K8e--