Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp194604pxb; Wed, 3 Feb 2021 03:16:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2G1Y9fo2tv3nfHe7u1kEw/WCVLvOAAWWPdhbO9sWMvwaKA1d8B/Kvn1+mRP2lMV52wigf X-Received: by 2002:a17:906:6087:: with SMTP id t7mr2724044ejj.90.1612350999302; Wed, 03 Feb 2021 03:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612350999; cv=none; d=google.com; s=arc-20160816; b=Y9vU3b7N4Iygckr04TAhCCjJadFqtx8X9FMVbVGeYQZ4rgz/kNG1BP83r0ct/+QKXK Rj8eCC11DNFXBF7VevGDOQEMPXlNjhE4ZYqNwI8M23eeut8oGDu+2FkFNMivtv3ZKxDp OtaZ6XqKuF1yIQIrCBTWo84AhNTmg5IarG7hSQi0qkZ3tjk18kdR6aTpwVRQsFnNNnIO W5Kj2mzKq2bpFHvzSsrdFVf+Hd3LdXiG12Hj0o5evNlA0wqupiMWKLf4kbzft/CUlPt+ g35d5NmqFHSLAgwyd0MUBVAs0ZrV0WSjnrXuzfcaoGqEwPz2DADFy1syWrn0yo9n779X 6NCw== 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; bh=dZTNryMzo0fhpZk8rAhcQsZq8wKgAKXOSqzer/F7F2o=; b=msB5LmlFRQq3bGgDRU4P2f8oI+e1Qjb3QsMXtoqBxIctAIxPfmQwlxeqyvU2UcL8tN L986PX684bnJVrFZoV2iVYa7CrglOt+FZ33v/vGHzj3Ri4tvDycf6mAyMwaHEC2fltrX R0se9qXcwH/1pjoPVTfNArQ8ABmHpooPJ6uauJ/S0hH+gGAiulqAqYQgNwhQsK10k1bA Sk/xMyJevIfWYmf3AIja70tTXH9mKLN1hWN6PPyXnEQRW4IoCMXN2q0FlLikdJX0Y4B4 TZGhPYWuJXwXLzUP6aV8k14lCr5zaEl3iZin/3zjBbDd74tPzoIMn3//AHcZbglj+yW4 WmOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si976338edp.327.2021.02.03.03.16.14; Wed, 03 Feb 2021 03:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233972AbhBCLNw (ORCPT + 99 others); Wed, 3 Feb 2021 06:13:52 -0500 Received: from foss.arm.com ([217.140.110.172]:38002 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234093AbhBCLNa (ORCPT ); Wed, 3 Feb 2021 06:13:30 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0696DD6E; Wed, 3 Feb 2021 03:12:45 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.11.206]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 59F653F719; Wed, 3 Feb 2021 03:12:43 -0800 (PST) Date: Wed, 3 Feb 2021 11:12:40 +0000 From: Mark Rutland To: Julien Thierry Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, broonie@kernel.org Subject: Re: [RFC PATCH 1/5] arm64: Move instruction encoder/decoder under lib/ Message-ID: <20210203111240.GB55896@C02TD0UTHF1T.local> References: <20210120171745.1657762-1-jthierry@redhat.com> <20210120171745.1657762-2-jthierry@redhat.com> <20210202101755.GB59049@C02TD0UTHF1T.local> <9c01f293-2c98-43e6-a497-89610fe5970e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c01f293-2c98-43e6-a497-89610fe5970e@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 09:26:45AM +0100, Julien Thierry wrote: > On 2/2/21 11:17 AM, Mark Rutland wrote: > > On Wed, Jan 20, 2021 at 06:17:41PM +0100, Julien Thierry wrote: > > > Aarch64 instruction set encoding and decoding logic can prove useful > > > for some features/tools both part of the kernel and outside the kernel. > > > > > > Isolate the function dealing only with encoding/decoding instructions, > > > with minimal dependency on kernel utilities in order to be able to reuse > > > that code. > > > > > > Code was only moved, no code should have been added, removed nor > > > modifier. > > > > > > Signed-off-by: Julien Thierry > > > > This looks sound, but the diff is a little hard to check. > > Yes, I was expecting this change to be hard to digest. > > > Would it be possible to split this into two patches, where: > > > > 1) Refactoring definitions into insn.h and insn.c, leaving those files > > in their current locations. > > I'm not quite sure I understand the suggestions. After this patch insn.h and > insn.c still contain some definitions that can't really be used outside of > kernel code which is why I split them into insn.* and aarch64-insn.* (the > latter containing what could be used by tools). Sorry; I hadn't appreciated what was getting left behind. With the series applied I see that's some kernel patching logic, and AArch32 insn bits. How about we invert the move, and split those bits out of insn.c first, then move the rest in one go, i.e. 1) Factor the patching bits out into new patching.{c,h} files. 2) Move insn.c to arch/arm64/lib/ 3) Split insn.* into aarch64-insn.* and aarch32-insn.* ... if that makes any sense? We might not even need to split the aarch32 bits out given they all have an aarch32_* prefix. > > 2) Moving insn.h and insn.c out to arch/arm64/lib/, updating includes > > > With that, the second patch might be easier for git to identify as a > > rename (if using `git format-patch -M -C`), and it'd be easier to see > > that there are no unintended changes. > > But it is more a split than a rename (at least in this patch). But I'm happy > to do this in another way. I think the above suggestion might solve that, unless I've missed something? Thanks, Mark.