From: Fuad Tabba <fuad.tabba@linux.dev>
To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
Mark Brown <broonie@kernel.org>,
Sascha Bischoff <Sascha.Bischoff@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Fuad Tabba <tabba@google.com>
Subject: [PATCH v2 06/10] arm64: sysreg: Drop the leading zeros from the TRFCR_ELx.TS values
Date: Fri, 27 Nov 2026 07:44:22 +0000 [thread overview]
Message-ID: <20261127074426.50739-7-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261127074426.50739-1-fuad.tabba@linux.dev>
TS in TRFCR_EL1 and TRFCR_EL2 is a two-bit field, but its enum values
are written with four binary digits. They're the only enum values in the
sysreg file whose number of digits differs from their field's width, and
the values themselves fit.
Drop the two leading zeros from each, ahead of a check that requires
every enum value to have as many digits as its field has bits.
No functional change intended.
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
arch/arm64/tools/sysreg | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
index ebe5c5bd6fef6..5b587a7544e40 100644
--- a/arch/arm64/tools/sysreg
+++ b/arch/arm64/tools/sysreg
@@ -2919,9 +2919,9 @@ EndSysreg
Sysreg TRFCR_EL1 3 0 1 2 1
Res0 63:7
UnsignedEnum 6:5 TS
- 0b0001 VIRTUAL
- 0b0010 GUEST_PHYSICAL
- 0b0011 PHYSICAL
+ 0b01 VIRTUAL
+ 0b10 GUEST_PHYSICAL
+ 0b11 PHYSICAL
EndEnum
Res0 4:2
Field 1 ExTRE
@@ -4300,10 +4300,10 @@ EndSysreg
Sysreg TRFCR_EL2 3 4 1 2 1
Res0 63:7
UnsignedEnum 6:5 TS
- 0b0000 USE_TRFCR_EL1_TS
- 0b0001 VIRTUAL
- 0b0010 GUEST_PHYSICAL
- 0b0011 PHYSICAL
+ 0b00 USE_TRFCR_EL1_TS
+ 0b01 VIRTUAL
+ 0b10 GUEST_PHYSICAL
+ 0b11 PHYSICAL
EndEnum
Res0 4
Field 3 CX
--
2.47.3
next prev parent reply other threads:[~2026-11-27 7:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 7:44 [PATCH v2 00/10] arm64: sysreg: More input checks in the sysreg generator Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 01/10] arm64: sysreg: Map MPAM1_EL12 to MPAM1_EL1 Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 02/10] arm64: sysreg: Remove the dead range check from parse_bitdef() Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 03/10] arm64: sysreg: Reject a Sysreg and a SysregFields with the same name Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 04/10] arm64: sysreg: Don't run the end-of-file checks after an error Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 05/10] arm64: sysreg: Reject a Fields or Mapping line with an undefined target Fuad Tabba
2026-11-27 7:44 ` Fuad Tabba [this message]
2026-11-27 7:44 ` [PATCH v2 07/10] arm64: sysreg: Reject an enum value not written at its field's width Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 08/10] arm64: sysreg: Reject a macro name defined twice Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 09/10] arm64: sysreg: Reject an out-of-range register encoding Fuad Tabba
2026-11-27 7:44 ` [PATCH v2 10/10] arm64: sysreg: Reject a bit position written with a leading zero Fuad Tabba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127074426.50739-7-fuad.tabba@linux.dev \
--to=fuad.tabba@linux.dev \
--cc=Sascha.Bischoff@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=tabba@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox