[boot-wrapper PATCH 1/2] aarch64: Document what we're doing when setting ZCR_EL3.LEN
broonie at kernel.org
broonie at kernel.org
Tue Feb 1 09:21:31 PST 2022
From: Mark Brown <broonie at kernel.org>
The enumeration and configuration algorithm for SVE vector lengths is not
100% obvious so add a comment explaining what's going on in case someone
looks at this code as a reference. If this is ever used on hardware with
asymmetric vector lengths we will need to handle this differently to meet
Linux's boot requirements but this is not a present issue and such hardware
would be fairly surprising.
Signed-off-by: Mark Brown <broonie at kernel.org>
---
arch/aarch64/init.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/aarch64/init.c b/arch/aarch64/init.c
index aa58567..8bb0524 100644
--- a/arch/aarch64/init.c
+++ b/arch/aarch64/init.c
@@ -88,6 +88,10 @@ void cpu_init_el3(void)
cptr |= CPTR_EL3_EZ;
msr(CPTR_EL3, cptr);
isb();
+ /*
+ * Write the maximum possible vector length, hardware
+ * will constrain to the actual limit.
+ */
msr(ZCR_EL3, ZCR_EL3_LEN_MAX);
}
--
2.30.2
More information about the linux-arm-kernel
mailing list