arm64: Allow the idreg override to deal with variable field width
authorMarc Zyngier <maz@kernel.org>
Thu, 30 Jun 2022 16:04:56 +0000 (17:04 +0100)
committerWill Deacon <will@kernel.org>
Fri, 1 Jul 2022 14:22:51 +0000 (15:22 +0100)
commit6b7ec18c09763f72dcd3d87e194860f9e9db8968
tree7a4d1980a525a38cca8431ff0219e4aebe2c99b2
parentfa8aa59ae6454b7a6a670acb2097e7800992cba1
arm64: Allow the idreg override to deal with variable field width

Currently, the override mechanism can only deal with 4bit fields,
which is the most common case. However, we now have a bunch of
ID registers that have more diverse field widths, such as
ID_AA64SMFR0_EL1, which has fields that are a single bit wide.

Add the support for variable width, and a macro that encodes
a feature width of 4 for all existing override.

No functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220630160500.1536744-6-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/idreg-override.c