On Thu, Oct 09, 2025 at 04:54:48PM +0000, Sascha Bischoff wrote:
The Prefix descriptor can be used in the following way:
Sysreg EXAMPLE 0 1 2 3 4
Prefix FEAT_A
Field 63:0 Foo
EndPrefix
Prefix FEAT_B
Field 63:1 Bar
Res0 0
EndPrefix
Field 63:0 Baz
EndSysreg
This seems like a reasonable solution to the practical problem, and the
implementation seems OK:
Reviewed-by: Mark Brown <broonie@kernel.org>
I think trying to do too much more would open up far too many cans of
worms to be reasonable to block things on.
One nit:
quoted hunk ↗ jump to hunk
# Parse a "<msb>[:<lsb>]" string into the global variables @msb and @lsb
@@ -132,10 +149,7 @@ $1 == "EndSysregFields" && block_current() == "SysregFields" {
if (next_bit >= 0)
fatal("Unspecified bits in " reg)
- define(reg "_RES0", "(" res0 ")")
- define(reg "_RES1", "(" res1 ")")
- define(reg "_UNKN", "(" unkn ")")
- print ""
+ define_resx_unkn(prefix, reg, res0, res1, unkn)
This refactoring into a function seems like it could usefully have been
a separate patch.