From: Mark Rutland <mark.rutland@arm.com>
To: Julien Thierry <jthierry@redhat.com>
Cc: catalin.marinas@arm.com, broonie@kernel.org, will@kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 1/5] arm64: Move instruction encoder/decoder under lib/
Date: Wed, 3 Feb 2021 11:12:40 +0000 [thread overview]
Message-ID: <20210203111240.GB55896@C02TD0UTHF1T.local> (raw)
In-Reply-To: <9c01f293-2c98-43e6-a497-89610fe5970e@redhat.com>
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 <jthierry@redhat.com>
> >
> > 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.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-03 11:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 17:17 [RFC PATCH 0/5] arm64: Prepare instruction decoder for objtool Julien Thierry
2021-01-20 17:17 ` [RFC PATCH 2/5] arm64: aarch64-insn: Add SVE instruction class Julien Thierry
2021-01-20 17:17 ` [RFC PATCH 3/5] arm64: aarch64-insn: Add barrier encodings Julien Thierry
2021-02-02 11:15 ` Mark Rutland
2021-02-03 8:47 ` Julien Thierry
2021-01-20 17:17 ` [RFC PATCH 4/5] arm64: aarch64-insn: Add some opcodes to instruction decoder Julien Thierry
2021-01-20 17:17 ` [RFC PATCH 5/5] arm64: Add load/store decoding helpers Julien Thierry
[not found] ` <20210120171745.1657762-2-jthierry@redhat.com>
[not found] ` <20210202101755.GB59049@C02TD0UTHF1T.local>
2021-02-03 8:26 ` [RFC PATCH 1/5] arm64: Move instruction encoder/decoder under lib/ Julien Thierry
2021-02-03 11:12 ` Mark Rutland [this message]
2021-02-03 17:30 ` Julien Thierry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210203111240.GB55896@C02TD0UTHF1T.local \
--to=mark.rutland@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=jthierry@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox