aarch64: correct ZCR_EL3.LEN initialization

The ZCR_ELx.LEN field covers bits[3:0] of ZCR_ELx, and bits[8:4] are
RAZ/WI, likely so that in future these can be used to extend LEN without
complicating the probing of the maximum available vector length.

Currently ZCR_EL3_LEN_MASK is defined as 0x1ff, covering both the LEN
field and the RAZ/WI bits.

To match the architecture as documented, reduce this down to 0xf, only
covering the bits currently allocated to the LEN field. We can extend
this in future if the LEN field is widened.

As the same time, rename ZCR_EL3_LEN_MASK to ZCR_EL3_LEN_MAX, as it is
used as a value rather than as a bit mask.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cc: Mark Brown <broonie@kernel.org>
2 files changed