[PATCH 0/4] arm64: insn: fix sysreg encodings, simplify dependent code
Ada Couprie Diaz
ada.coupriediaz at arm.com
Fri Oct 16 09:46:44 PDT 2026
Hello,
This is a follow-up to [0] which goes further than initially anticipated.
Indeed, after Vladimir's comment I checked what was going on
in more details and realized that the system register definitions had some
mistakes, were quite inconsistent and duplicated the sysreg definitions
in `arch/arm64/include/sysreg.h`.
Thus this series takes the approach of re-using the encodings we already
define and depend on, and making easier to re-use if needed.
That meant I could also clean up unecessary operations and distinctions.
This simplification _could_ be taken further by completely removing the
insn enum in favour of using the sysreg.h definitions directly,
but I figured it was useful to keep the enum for typing/argument hints.
I was unsure of how to split this series, so patch 2 and 3 could reasonably
be squashed into patch 4 if that does not make the commit too unscrutable.
Thank you in advance,
Ada
[0]: https://lore.kernel.org/r/20260928133034.243541-1-ada.coupriediaz@arm.com
Ada Couprie Diaz (4):
arm64: sysreg: generate TPIDR, SP and DAIF encodings
arm64: insn: fix system register inconsistencies
arm64: insn: operate on MSR/MRS sysreg field via defines
arm64: insn: clean-up sysregs handling
arch/arm64/include/asm/insn.h | 41 ++++++++++----------------
arch/arm64/include/asm/sysreg.h | 8 -----
arch/arm64/kernel/probes/decode-insn.c | 2 +-
arch/arm64/lib/insn.c | 8 ++---
arch/arm64/tools/sysreg | 37 +++++++++++++++++++++++
5 files changed, 57 insertions(+), 39 deletions(-)
base-commit: 93f51579e7df248780214094418f205253383cc5
--
2.43.0
More information about the linux-arm-kernel
mailing list