Skip to content
Commit f2c28120 authored by Mark Brown's avatar Mark Brown Committed by Will Deacon
Browse files

arm64: cpufeature: Warn if we attempt to read a zero width field



Add a WARN_ON_ONCE() when extracting a field if no width is specified. This
should never happen outside of development since it will be triggered with
or without the feature so long as the relevant ID register is present.  If
the warning triggers hope that the field was the standard 4 bits wide and
soldier on.

Suggested-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220307180900.3045812-1-broonie@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent b8fc7801
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment