Re: [PATCH 5/9] arm64: sysreg: Reject a Fields or Mapping line with an undefined target
From: Mark Brown
Date: Mon Nov 23 2026 - 14:40:30 EST
On Mon, Nov 23, 2026 at 07:52:15AM +0000, Fuad Tabba wrote:
> A Sysreg block can use another block's layout. "Fields X" names a
> SysregFields block and "Mapping X" another Sysreg. The generator emits
> the register's RESx and UNKN masks as X_RES0, X_RES1 and X_UNKN, but it
> doesn't check that X exists. A misspelt or missing X gives macros that
> expand to undefined names, and the build fails only once something uses
> them. MPAM1_EL12 had such a line.
>
> Check every Fields and Mapping target once the whole file is read, since
> a target may be defined after the register that names it (MPAM1_EL1
> follows MPAM1_EL12). Either kind of block defines the masks, so the
> check accepts either kind as the target of a Fields or a Mapping line.
> Give fatal() an optional line number, so that the error is reported at
> the Fields or Mapping line.
Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature