linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: sysreg: Fix sysreg field definitions and generation script
@ 2025-08-13 16:45 Fuad Tabba
  2025-08-13 16:45 ` [PATCH v2 1/2] arm64: sysreg: Fix and tidyup sysreg field definitions Fuad Tabba
  2025-08-13 16:45 ` [PATCH v2 2/2] arm64: sysreg: Add validation checks to sysreg header generation script Fuad Tabba
  0 siblings, 2 replies; 5+ messages in thread
From: Fuad Tabba @ 2025-08-13 16:45 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel
  Cc: maz, oliver.upton, will, joey.gouly, suzuki.poulose, yuzenghui,
	catalin.marinas, vdonnefort, qperret, sebastianene, keirf,
	smostafa, tabba

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-14  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 16:45 [PATCH v2 0/2] arm64: sysreg: Fix sysreg field definitions and generation script Fuad Tabba
2025-08-13 16:45 ` [PATCH v2 1/2] arm64: sysreg: Fix and tidyup sysreg field definitions Fuad Tabba
2025-08-14  7:13   ` Marc Zyngier
2025-08-13 16:45 ` [PATCH v2 2/2] arm64: sysreg: Add validation checks to sysreg header generation script Fuad Tabba
2025-08-14  7:16   ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).