[PATCH] arm64/sysreg: Fix BWE field encoding in ID_AA64DFR2_EL1
Oliver Upton
oupton at kernel.org
Wed Jul 1 10:09:33 PDT 2026
On Tue, Jun 30, 2026 at 10:23:47PM +0000, Jia He wrote:
> Commit 93d7356e4b30 ("arm64: sysreg: Describe ID_AA64DFR2_EL1 fields")
> encodes the FEAT_BWE2 value of the BWE field as '0b0002'. Binary
> literals only accept the digits 0 and 1, so the intended value is 2,
> i.e. 0b0010.
>
> The macro generated by gen-sysreg.awk currently expands to
> #define ID_AA64DFR2_EL1_BWE_FEAT_BWE2 UL(0b0002)
> is not legal C and would fail to compile if any in-tree code referenced
> it. At present no caller uses this enum value, so the kernel still
> builds cleanly, but the bug is latent.
>
> Fix the typo by using the correct binary literal 0b0010.
>
> Cc: Bin Guo <guobin at linux.alibaba.com>
> Fixes: 93d7356e4b30 ("arm64: sysreg: Describe ID_AA64DFR2_EL1 fields")
> Signed-off-by: Jia He <justin.he at arm.com>
> Reviewed-by: Mark Brown <broonie at kernel.org>
Hah, I screwed that up pretty good!
Reviewed-by: Oliver Upton <oupton at kernel.org>
> ---
> arch/arm64/tools/sysreg | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
> index bc1788b1662b..7cb61aca3797 100644
> --- a/arch/arm64/tools/sysreg
> +++ b/arch/arm64/tools/sysreg
> @@ -1806,7 +1806,7 @@ Res0 15:8
> UnsignedEnum 7:4 BWE
> 0b0000 NI
> 0b0001 FEAT_BWE
> - 0b0002 FEAT_BWE2
> + 0b0010 FEAT_BWE2
> EndEnum
> UnsignedEnum 3:0 STEP
> 0b0000 NI
> --
> 2.34.1
>
More information about the linux-arm-kernel
mailing list