diff options
author | Fuad Tabba <tabba@google.com> | 2025-08-29 10:51:43 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2025-09-11 14:46:07 +0100 |
commit | 382cbbe7fb2ae841a7e7b4c40a02f12afc803c69 (patch) | |
tree | ba0e3398dbd7a7aafa87966f4556d06f6f1b1791 /lib/parser.c | |
parent | f4d4ebc84995178273740f3e601e97fdefc561d2 (diff) |
arm64: sysreg: Add validation checks to sysreg header generation script
The gen_sysreg.awk script processes the system register specification in
the sysreg text file to generate C macro definitions. The current script
will silently accept certain errors in the specification file, leading
to incorrect header generation.
For example, a Sysreg or SysregFields can be accidentally duplicated,
causing its macros to be emitted twice. An Enum can contain duplicate
values for different items, which is architecturally incorrect.
Add checks to catch these errors at build time. The script now tracks
all seen Sysreg and SysregFields definitions and checks for duplicates.
It also tracks values within each Enum block to ensure entries are
unique.
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions