linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [boot-wrapper PATCH 1/2] aarch64: Document what we're doing when setting ZCR_EL3.LEN
@ 2022-02-01 17:21 broonie
  2022-02-01 17:21 ` [boot-wrapper PATCH 2/2] aarch64: Enable use of SME by EL2 and below broonie
  0 siblings, 1 reply; 6+ messages in thread
From: broonie @ 2022-02-01 17:21 UTC (permalink / raw)
  To: Mark Rutland; +Cc: linux-arm-kernel, Mark Brown

From: Mark Brown <broonie@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@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-04 11:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-01 17:21 [boot-wrapper PATCH 1/2] aarch64: Document what we're doing when setting ZCR_EL3.LEN broonie
2022-02-01 17:21 ` [boot-wrapper PATCH 2/2] aarch64: Enable use of SME by EL2 and below broonie
2022-02-01 18:16   ` Mark Rutland
2022-02-01 18:22     ` Mark Brown
2022-02-02 10:30       ` Mark Rutland
2022-02-04 10:59     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).