Commit 2bdd592
committed
arm64: sysreg: Add validation checks to sysreg header generation script
JIRA: https://issues.redhat.com/browse/RHEL-101059
commit 382cbbe
Author: Fuad Tabba <tabba@google.com>
Date: Fri, 29 Aug 2025 10:51:43 +0100
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>
Signed-off-by: Mark Salter <msalter@redhat.com>1 parent 4e7b265 commit 2bdd592
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
165 | 173 | | |
166 | 174 | | |
167 | 175 | | |
| |||
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| 295 | + | |
| 296 | + | |
287 | 297 | | |
288 | 298 | | |
289 | 299 | | |
| |||
297 | 307 | | |
298 | 308 | | |
299 | 309 | | |
| 310 | + | |
| 311 | + | |
300 | 312 | | |
301 | 313 | | |
302 | 314 | | |
| |||
309 | 321 | | |
310 | 322 | | |
311 | 323 | | |
| 324 | + | |
| 325 | + | |
312 | 326 | | |
313 | 327 | | |
314 | 328 | | |
| |||
320 | 334 | | |
321 | 335 | | |
322 | 336 | | |
| 337 | + | |
| 338 | + | |
323 | 339 | | |
324 | 340 | | |
325 | 341 | | |
| |||
329 | 345 | | |
330 | 346 | | |
331 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
332 | 352 | | |
333 | 353 | | |
334 | 354 | | |
| |||
0 commit comments