[PATCH v2 0/2] arm64: sysreg: Fix sysreg field definitions and generation script

Fuad Tabba tabba at google.com
Wed Aug 13 09:45:04 PDT 2025


The sysreg file has an erroronous value in the Security Enum, where
NSACR_RFR is set to 0b0001 instead of the spec value of 0b0010.
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 header file and could be a source of future
bugs.

Fix the Enum value, remove the redundant Sysreg definitions, and while
at it, tidy up the sysreg file a bit.

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 the errors that
I've seen, which also are errors that wouldn't generate a build error
later on.

Changes since v1 [1]:
- Remove redundant definition of CPACR_EL12
- New patch that adds validation to the sysreg header generation script
- Rebase on 6.17-rc1

Cheers,
/fuad

[1] https://lore.kernel.org/all/20250808123744.2087648-1-tabba@google.com/

Fuad Tabba (2):
  arm64: sysreg: Fix and tidyup sysreg field definitions
  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: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
-- 
2.51.0.rc0.215.g125493bb4a-goog




More information about the linux-arm-kernel mailing list