From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB32FC433F5 for ; Tue, 1 Feb 2022 17:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vEv8oKf2036QZH0CgnmC36Jvc0cqPTE7FAEFcEfEvSM=; b=paS/n3MyLH1ZNl Zd9BfI1l2YCjxwULn5vbYEcJrfSmcPyPWTBHy7QGR7Hd+f4IR8u1Omv6KtdJkX4zCTRQvm3mPBhh3 B+58o5m0+qlMhjCc+mVqlJsNEzk4qsnpBZXPDst8rjq/pVx1M6H6UvQHbShVlp4qtAJjyMiGdF/ii DTVJjlFg+R/7hfHQmN4P8imS77tM0erKxEsW8LLJd2cq78aAqZuHIUMwwAk92L+rT9Fx/C4KUM7Yx WUXVYxhBeQQ/On1dS9uOFPsW6u2OUKRMOOykSQnzIF4JYuIAWcalyTlKVJUQBPJ06QU6G//R84Dsh cC1zFSl+OiHv4l5apEbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEwqz-00D9I3-Vr; Tue, 01 Feb 2022 17:22:07 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEwqo-00D9FX-5J for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 17:21:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 48132B82F23; Tue, 1 Feb 2022 17:21:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2194CC340EB; Tue, 1 Feb 2022 17:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643736111; bh=YbphCBId83R3REprQulyiePKxly16ZH2u0TZVa/kXlA=; h=From:To:Cc:Subject:Date:From; b=dTcTH5HiOPTjCjEtxGgwVOMUGaTZT2gTc/scq1Zb4tZWTJzol7TMNpvJkbF/k+BtH eQxwbyK91vhCbdM3ZUj3z+uDOz9gxRC6TLGn9P68qDGzl2jJ4ZycNJq9XX2PvZQnRv d0tH/nbo32lVHsF29eD73lmRUx4KIWC2c1rnJakTwJLlmleDKWK3ik6bBfH2n44bM+ NNi2AxgMkJEj1wjdwCesmS3hxIsV8T1GoJi9Z0MH+3FC8DcWAbQsva3Y/6xdZ1o7rJ VbZE+yagVeZZtxfr/Ox4bq7c3XnCbCnhd7bMWX6Z8ksVZ2Rw1wP8MRlVSR07Z5F6YA iQJmDgDmQ0Kng== From: broonie@kernel.org To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, Mark Brown 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 Message-Id: <20220201172132.2399026-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=944; h=from:subject; bh=xkahFYs4BTbu7n7CCl+41pqG8rbyaJm9xgnuXWzr5aw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh+WvToAEPrU6OLRJp16aWoqrkQMETixOKHaOFYFhT oCIWvsmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYflr0wAKCRAk1otyXVSH0MjFCA CD2v7pMPLI+8xdWvBxd3DuOBMnLEZfRtxVSMXS//GzmPch/LtuM7nm40WWmpg4BRODvMSPpvksAcWN jDLsFVrwzZvfN3/fBpTpVG5sfMMbZU6imx25cf0WiP2wn0YXirrGLQ/gUVoV+r3u4rq8pXLWUWPHoY LtkOkZoFTRrDRbrtfmaXT9D48V/yaxnZydXshhOgtBymcJWbj38hiU76CoTX1xsOn9Ngu+aDGkDoSX c9ibOMIZ1pzmjzJcIijviy8dhrKJPe8qeuBsQwb8uAQ2tgkzVl8YwM8/rWrHm+aSbGzCtG8WmJfrqm NdSdJC/FRREqDtHYgSQqridZa7h0MA X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220201_092154_414007_6BB90F77 X-CRM114-Status: GOOD ( 12.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mark Brown 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 --- 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