summaryrefslogtreecommitdiff
path: root/arch/arm64/tools
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2026-07-30 08:09:54 +0100
committerOliver Upton <oupton@kernel.org>2026-07-31 00:17:02 -0700
commit6ae7fab7d9d33b5b552d1eb901d2594d0999ba3d (patch)
tree28da49d7466a966df9ba2b361b5a5097f11f490a /arch/arm64/tools
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
arm64: sysreg: Emit RESx/UNKN values for Mapping/Fields definitions
The sysreg file is using the Mapping or Fields qualifiers to indicate that a given encoding is only a mapping to a particular register (or an instance of a more generic register definition). As a result, we don't output any definition, and instead expect the canonical definitions to be used. This works rather well for individual fields, but creates problems for macros that refer to more generic classes of bits such as RESx. Relax the above rule by emitting the RESx and UNKN values for Mapping and Fields qualifiers as well. Signed-off-by: Marc Zyngier <maz@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://patch.msgid.link/20260730071022.296811-2-maz@kernel.org Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'arch/arm64/tools')
-rwxr-xr-xarch/arm64/tools/gen-sysreg.awk8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk
index 86860ab672dc..53844f5c5e52 100755
--- a/arch/arm64/tools/gen-sysreg.awk
+++ b/arch/arm64/tools/gen-sysreg.awk
@@ -228,7 +228,7 @@ $1 == "EndSysreg" && block_current() == "Sysreg" {
}
# Currently this is effectivey a comment, in future we may want to emit
-# defines for the fields.
+# defines for the fields. We do emit RESx and UNKN values in any case.
($1 == "Fields" || $1 == "Mapping") && block_current() == "Sysreg" {
expect_fields(2)
@@ -239,9 +239,9 @@ $1 == "EndSysreg" && block_current() == "Sysreg" {
print ""
next_bit = -1
- res0 = null
- res1 = null
- unkn = null
+ res0 = $2 "_RES0"
+ res1 = $2 "_RES1"
+ unkn = $2 "_UNKN"
next
}