Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64/sysreg: Extend the maximum width of a register and symbol name

32bit has multiple values for its id registers, as extra properties
were added to the CPUs. Some of these end up having long names, which
exceed the fixed 48 character column that the sysreg awk script generates.

For example, the ID_MMFR1_EL1.L1Hvd field has an encoding whose natural
name would be 'invalidate Iside only'. Using this causes compile errors
as the script generates the following:
#define ID_MMFR1_EL1_L1Hvd_INVALIDATE_ISIDE_ONLYUL(0b0001)

Add a few extra characters.

Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: James Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20221130171637.718182-17-james.morse@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

James Morse and committed by
Will Deacon
7587cdef c6e155e8

+1 -1
+1 -1
arch/arm64/tools/gen-sysreg.awk
··· 33 33 # Print a CPP macro definition, padded with spaces so that the macro bodies 34 34 # line up in a column 35 35 function define(name, val) { 36 - printf "%-48s%s\n", "#define " name, val 36 + printf "%-56s%s\n", "#define " name, val 37 37 } 38 38 39 39 # Print standard BITMASK/SHIFT/WIDTH CPP definitions for a field