mbox series

[0/2] arm64: insn: cleanups

Message ID 20210609102301.17332-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: insn: cleanups | expand

Message

Mark Rutland June 9, 2021, 10:22 a.m. UTC
Hi Will,

These couple of patches are fixups for the arm64 for-next/insn branch, which
try to bring that inline with the intent of the original patches.

The main change is to have users of patching code explicitly include
<asm/patching.h> (which was the intent of the original patches), as having
<asm/insn.h> include <asm/patching.h> can create some painful header
dependencies, and this more clearly separates the insn parts under arm64/lib/
from the parts under arm64/kernel/. The header dependencies don't appear to be
an issue today, but get in the way of some subsequent rework patches I'm
developing, and I'd like to fix that now before there's any additional reliance
on <asm/insn.h> pulling things in.

The other change is to move AARCH64_INSN_SIZE into <asm/insn.h>, to keep all
the insn bits in one place.

The big diff for kprobes.c is due to sorting the includes, which are unchanged
other than the <asm/patching.h> inclusion.

Thanks.
Mark.

Mark Rutland (2):
  arm64: insn: decouple patching from insn code
  arm64: insn: move AARCH64_INSN_SIZE into <asm/insn.h>

 arch/arm64/include/asm/alternative-macros.h |  4 +---
 arch/arm64/include/asm/insn.h               |  4 +++-
 arch/arm64/include/asm/kvm_asm.h            |  1 +
 arch/arm64/include/asm/patching.h           |  2 --
 arch/arm64/kernel/cpufeature.c              |  1 +
 arch/arm64/kernel/ftrace.c                  |  1 +
 arch/arm64/kernel/jump_label.c              |  1 +
 arch/arm64/kernel/kgdb.c                    |  1 +
 arch/arm64/kernel/patching.c                |  2 ++
 arch/arm64/kernel/probes/kprobes.c          | 18 ++++++++++--------
 arch/arm64/kernel/traps.c                   |  2 ++
 arch/arm64/net/bpf_jit_comp.c               |  1 +
 12 files changed, 24 insertions(+), 14 deletions(-)

Comments

Will Deacon June 11, 2021, 4:15 p.m. UTC | #1
On Wed, 9 Jun 2021 11:22:59 +0100, Mark Rutland wrote:
> These couple of patches are fixups for the arm64 for-next/insn branch, which
> try to bring that inline with the intent of the original patches.
> 
> The main change is to have users of patching code explicitly include
> <asm/patching.h> (which was the intent of the original patches), as having
> <asm/insn.h> include <asm/patching.h> can create some painful header
> dependencies, and this more clearly separates the insn parts under arm64/lib/
> from the parts under arm64/kernel/. The header dependencies don't appear to be
> an issue today, but get in the way of some subsequent rework patches I'm
> developing, and I'd like to fix that now before there's any additional reliance
> on <asm/insn.h> pulling things in.
> 
> [...]

Applied to arm64 (for-next/insn), thanks!

[1/2] arm64: insn: decouple patching from insn code
      https://git.kernel.org/arm64/c/78b92c7337e1
[2/2] arm64: insn: move AARCH64_INSN_SIZE into <asm/insn.h>
      https://git.kernel.org/arm64/c/3e00e39d9dad

Cheers,