All of lore.kernel.org
 help / color / mirror / Atom feed
From: broonie@kernel.org
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, Mark Brown <broonie@kernel.org>
Subject: [boot-wrapper PATCH 1/2] aarch64: Document what we're doing when setting ZCR_EL3.LEN
Date: Tue,  1 Feb 2022 17:21:31 +0000	[thread overview]
Message-ID: <20220201172132.2399026-1-broonie@kernel.org> (raw)

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

             reply	other threads:[~2022-02-01 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 17:21 broonie [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220201172132.2399026-1-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.