[PATCH v3 0/3] arm64: sysreg: Fix sysreg field definitions and generation script
Fuad Tabba
tabba at google.com
Tue Sep 9 00:23:20 PDT 2025
The sysreg definitions file has a few errors. In Enum Security,
NSACR_RFR is set to 0b0001 instead of the spec value of 0b0010.
Additionaly, the sign of the Enums DoubleLock and EIESB are wrong
(should be Signed and Unsigned, respectively).
Moreover, the file has some redundant definitions, e.g.,
RCWSMASK_EL1. While these redundant definitions are not wrong per se,
they add unnecessary code into the generated header file and could be a
source of future bugs.
Fix the Enums and remove the redundant Sysreg definitions.
To reduce the chance of this happening in the future, add validation to
the sysreg header generation script. I didn't want to go overboard with
validation, so I only added validation that would catch most of the
errors that I've seen, which also are errors that wouldn't generate a
build error later on.
Changes since v2 [1]:
- Added patch that fixes field sign definitions for DoubleLock and EIESB
- Removed whitespace fixes from first patch, since there are more
inconsistent whitespace use in the file, and fixing it all would lead
to too much churn.
- Collected Reviews/Acks
- Rebased on 6.17-rc3
Cheers,
/fuad
[1] https://lore.kernel.org/all/20250813164506.1203851-1-tabba@google.com/
Fuad Tabba (3):
arm64: sysreg: Fix and tidy up sysreg field definitions
arm64: sysreg: Correct sign definitions for EIESB and DoubleLock
arm64: sysreg: Add validation checks to sysreg header generation
script
arch/arm64/tools/gen-sysreg.awk | 20 ++++++++++++++++++++
arch/arm64/tools/sysreg | 18 +++++-------------
2 files changed, 25 insertions(+), 13 deletions(-)
base-commit: 1b237f190eb3d36f52dffe07a40b5eb210280e00
--
2.51.0.338.gd7d06c2dae-goog
More information about the linux-arm-kernel
mailing list