Message ID | 20240122-arm64-sve-sme-doc-v1-3-3d492e45265b@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2830089dyb; Mon, 22 Jan 2024 12:46:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4cns6cNTZ6HoXQbBJoNqYGfbkAbAK4xaluzY4hX+JExXhkpZdj5dQWqelfO939ZaYgpNn X-Received: by 2002:a05:6a20:1b27:b0:19b:1e74:8c9f with SMTP id ch39-20020a056a201b2700b0019b1e748c9fmr4910020pzb.112.1705956385163; Mon, 22 Jan 2024 12:46:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705956385; cv=pass; d=google.com; s=arc-20160816; b=WnKSe6Wyz81YYU9uoCIsdr8YUFD/eSPBQQqCr1iT4zO8XPPVUIKIfDAmgpXwzmcO76 bep5XaYGKEtlhJMhgFgVyRNCw8t/BAl36ni5apwj8c+8pWUAEakzGraTGyVPr8zjj8Uw uiO5d83f0uN/k4wKLfmUmOcsbWFJWuSrtvr944Raov1USXtS6Gzuv+EYJLtxwgbtRa0B AN++vEORl2bomdTuZpDtvjvEqlLtcIBYnCZoPvIJ/m6H0u5HC0eAzh+5gBcqSSf2RsXL NtbYV0oZm41lSKpGOjjOCkimK4BYFhONUUtmU1GZWJuc+c0zNGLW4toeDlKnobATs2Ao CjHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=n9LF1Wgbu1Sn+gUMZTy2RZ9UNV+10y8zpSQkI+/dSvo=; fh=mjMzHDbQQJirYKMF+sF6Bqjp0nBcKTfvX6zRZZfYUaY=; b=0s1Lk4l2nUW8Cmb5gwSuTeXaIlYQP/U1oIQ7X6fEW8JbNMyeY8bnofE77TjyYrAqfB eizXXOS5diVO9BzrJSjNPs6+HlS5ovTkqELJhX9a60jt6cjT98NWVEX6jHcCRSwtQMIQ hVVRjx9npsM/MNAsU/cmds6bhjuuKY9bz7xVWMTR49gBX0qiUtnna8cw5+ngvej4jo63 /qvhcPvZQW6sixPIJutCFxVV6JyQ/YgKsf/9CG3KEWe3fJkxhsriRCwPXjHytaEERk/1 gxR4n68ZqJ2iF+Su683teiaTq4JKuYMRXrwds2KDDEvUt+xGGoSl5dDOzQEJGeY5zDBF NquQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Gm/qcEFf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g14-20020a056a0023ce00b006dbafbb1613si7476942pfc.193.2024.01.22.12.46.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 12:46:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Gm/qcEFf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34134-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 54C8728C77B for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 20:43:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A209A482D8; Mon, 22 Jan 2024 20:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gm/qcEFf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E6E6481B1; Mon, 22 Jan 2024 20:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705956144; cv=none; b=rXK4EBUCf8k2xrVwa08OKaEbkYz04fuDkH653ZTxiBCwKNJo2MB7MemBP6Iu6YJ2AoKEyoS/Ja+OEso6/Xb0Z3rW6PX4fSqcdkpY5FaD9NYGMHNtyYlpqAgBX/D8jmDkqBASxeKzozU9V5iMlrIZd8LQudXY7fQfYlUV2kdpd2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705956144; c=relaxed/simple; bh=fjtGYrPLVAgmnbjt+Ekb+IEbQu2c0zwfHg/G7gZsVmI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PcFiVrntOcXj4NjIjIlU8ZbzepPDlgrzA5tmsspLCO6WNE2dmR63KIHcmzHyKq6qKK2mzunXkXxMi5hb39bceCQqXQORp6p8GwQW5uKFrM+OX7jVDmvwBL+Wutt4CuV71keJ+3NxNhko+LpCXFp6FWG4xozS1RIlnglLlU10AbA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Gm/qcEFf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99D76C43394; Mon, 22 Jan 2024 20:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705956143; bh=fjtGYrPLVAgmnbjt+Ekb+IEbQu2c0zwfHg/G7gZsVmI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Gm/qcEFfiSNUvkiYPekzxnCgffzrZrI0Jbe2TkhEzD/a1Bgwo9j9yFsV9UTTPJozG wYPAqCysMsWfPqH/Y4fv9gPhoIhFODWmE55a1CPr0O7yocY3N2t8+C5ldmR/RYqRyy D0zhzdYC5LGHrBZdaZldNRZ/xUd22SbYm+Gxbuab+V6Ycg2im9X1hoyGJa6VJsxmOh ipY42DR0cQy1Ch90ARtStJ1BEYHhKDaah3Q6Dvg7XSMhAd4aY+0Iv7uHPMvdgN0Df8 1h+FMpMxljyMaL65Bt9TPlnVn/+/79cBmayWIJGk5tH64lAU6xdGYyOlqbbg9+5miQ 4UABMgXSkbZWQ== From: Mark Brown <broonie@kernel.org> Date: Mon, 22 Jan 2024 20:41:53 +0000 Subject: [PATCH 3/4] arm64/fp: Clarify effect of setting an unsupported system VL Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240122-arm64-sve-sme-doc-v1-3-3d492e45265b@kernel.org> References: <20240122-arm64-sve-sme-doc-v1-0-3d492e45265b@kernel.org> In-Reply-To: <20240122-arm64-sve-sme-doc-v1-0-3d492e45265b@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Jonathan Corbet <corbet@lwn.net> Cc: Dave Martin <dave.martin@arm.com>, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>, Edmund Grimley-Evans <edmund.grimley-evans@arm.com> X-Mailer: b4 0.13-dev-5c066 X-Developer-Signature: v=1; a=openpgp-sha256; l=2147; i=broonie@kernel.org; h=from:subject:message-id; bh=fjtGYrPLVAgmnbjt+Ekb+IEbQu2c0zwfHg/G7gZsVmI=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlrtMiH/73f//2tkGiaJyZTf5xHRxxVBa9xFB2oZ2L zwYsEhaJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZa7TIgAKCRAk1otyXVSH0PHiB/ 9zHa9KEFYs2ugoCsm80PWrKpmYx7jbcBOAt1g3oeczKb/va6JJ8R8yS4RO+t0zjM+SgEWE2gMboGMz WfUNahqBNUYMy30d0sUCnj0ykg/ghbn/SY0Ng5wfRLG0yExhnde4OSIbdtV8MB3S22TuOgevK6y2RB NUWNljFA3h031svejBLxzIuKg+BAZJshAKtavwWDxY3N4og3h/KBeyvwhSpyPuZaVAOtZgODrcLwUX l6hTlmcn8M0E0Vwsjb9KonvrLA+FW/5yDNZVqYKSTEpbmDkZIHE4+FJpFY1ysmbj5ulodp1nN+V2Y4 9AkkJP5c4s66BXeveCA9VgM1Wv2K2x X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788824922351134734 X-GMAIL-MSGID: 1788824922351134734 |
Series |
arm64/fp: Documentation cleanups and clarifications
|
|
Commit Message
Mark Brown
Jan. 22, 2024, 8:41 p.m. UTC
The documentation for system vector length configuration does not cover all
cases where unsupported values are written, tighten it up.
Reported-by: Edmund Grimley-Evans <edmund.grimley-evans@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
Documentation/arch/arm64/sme.rst | 5 ++---
Documentation/arch/arm64/sve.rst | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
Comments
On Mon, Jan 22, 2024 at 08:41:53PM +0000, Mark Brown wrote: > The documentation for system vector length configuration does not cover all > cases where unsupported values are written, tighten it up. > > Reported-by: Edmund Grimley-Evans <edmund.grimley-evans@arm.com> > Signed-off-by: Mark Brown <broonie@kernel.org> > --- > Documentation/arch/arm64/sme.rst | 5 ++--- > Documentation/arch/arm64/sve.rst | 5 ++--- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/Documentation/arch/arm64/sme.rst b/Documentation/arch/arm64/sme.rst > index 3133d0e91b48..ba0a5e5b2523 100644 > --- a/Documentation/arch/arm64/sme.rst > +++ b/Documentation/arch/arm64/sme.rst > @@ -379,9 +379,8 @@ The regset data starts with struct user_za_header, containing: > /proc/sys/abi/sme_default_vector_length > > Writing the text representation of an integer to this file sets the system > - default vector length to the specified value, unless the value is greater > - than the maximum vector length supported by the system in which case the > - default vector length is set to that maximum. > + default vector length to the specified value rounded to a supported value > + using the same rules as for setting vector length via prctl(). Do parallel changes need to be made in sve.rst? (There seems to be so much duplication and copy-paste between these files that I wonder whether it would make sense to merge them... but that's probably a separate discussion.) Nit: is it better to name the prctl here than just to say prctl()? That would be easier for the reader to cross-reference. > > The result can be determined by reopening the file and reading its > contents. > diff --git a/Documentation/arch/arm64/sve.rst b/Documentation/arch/arm64/sve.rst > index b45a2da19bf1..b923727ff4b9 100644 > --- a/Documentation/arch/arm64/sve.rst > +++ b/Documentation/arch/arm64/sve.rst > @@ -423,9 +423,8 @@ The regset data starts with struct user_sve_header, containing: > /proc/sys/abi/sve_default_vector_length > > Writing the text representation of an integer to this file sets the system > - default vector length to the specified value, unless the value is greater > - than the maximum vector length supported by the system in which case the > - default vector length is set to that maximum. > + default vector length to the specified value rounded to a supported value > + using the same rules as for setting vector length via prctl(). Ditto. [...] Cheers ---Dave
On Tue, Jan 23, 2024 at 03:49:27PM +0000, Dave Martin wrote: > On Mon, Jan 22, 2024 at 08:41:53PM +0000, Mark Brown wrote: > > /proc/sys/abi/sme_default_vector_length > > > > Writing the text representation of an integer to this file sets the system > > - default vector length to the specified value, unless the value is greater > > - than the maximum vector length supported by the system in which case the > > - default vector length is set to that maximum. > > + default vector length to the specified value rounded to a supported value > > + using the same rules as for setting vector length via prctl(). > Do parallel changes need to be made in sve.rst? They are, in this very patch? > (There seems to be so much duplication and copy-paste between these > files that I wonder whether it would make sense to merge them... but > that's probably a separate discussion.) Indeed, thanks for volunteering. Note that there are differences resulting from specification differences. > Nit: is it better to name the prctl here than just to say prctl()? > That would be easier for the reader to cross-reference. I guess, though it doesn't seem entirely idiomatic.
On Tue, Jan 23, 2024 at 06:42:03PM +0000, Mark Brown wrote: > On Tue, Jan 23, 2024 at 03:49:27PM +0000, Dave Martin wrote: > > On Mon, Jan 22, 2024 at 08:41:53PM +0000, Mark Brown wrote: > > > > /proc/sys/abi/sme_default_vector_length > > > > > > Writing the text representation of an integer to this file sets the system > > > - default vector length to the specified value, unless the value is greater > > > - than the maximum vector length supported by the system in which case the > > > - default vector length is set to that maximum. > > > + default vector length to the specified value rounded to a supported value > > > + using the same rules as for setting vector length via prctl(). > > > Do parallel changes need to be made in sve.rst? > > They are, in this very patch? Duh, yes. My brain seems to have auto-ignored the second hunk, since it was clearly a duplicate :P > > (There seems to be so much duplication and copy-paste between these > > files that I wonder whether it would make sense to merge them... but > > that's probably a separate discussion.) > > Indeed, thanks for volunteering. Note that there are differences > resulting from specification differences. Thanks for agreeing to an unspecfied deadline ;) I might have a go at some point though, just to familiarise myself with the differences... > > Nit: is it better to name the prctl here than just to say prctl()? > > That would be easier for the reader to cross-reference. > > I guess, though it doesn't seem entirely idiomatic. I expect counterexamples can be found, but I guess the reader can figure it out either way. Cheers ---Dave
diff --git a/Documentation/arch/arm64/sme.rst b/Documentation/arch/arm64/sme.rst index 3133d0e91b48..ba0a5e5b2523 100644 --- a/Documentation/arch/arm64/sme.rst +++ b/Documentation/arch/arm64/sme.rst @@ -379,9 +379,8 @@ The regset data starts with struct user_za_header, containing: /proc/sys/abi/sme_default_vector_length Writing the text representation of an integer to this file sets the system - default vector length to the specified value, unless the value is greater - than the maximum vector length supported by the system in which case the - default vector length is set to that maximum. + default vector length to the specified value rounded to a supported value + using the same rules as for setting vector length via prctl(). The result can be determined by reopening the file and reading its contents. diff --git a/Documentation/arch/arm64/sve.rst b/Documentation/arch/arm64/sve.rst index b45a2da19bf1..b923727ff4b9 100644 --- a/Documentation/arch/arm64/sve.rst +++ b/Documentation/arch/arm64/sve.rst @@ -423,9 +423,8 @@ The regset data starts with struct user_sve_header, containing: /proc/sys/abi/sve_default_vector_length Writing the text representation of an integer to this file sets the system - default vector length to the specified value, unless the value is greater - than the maximum vector length supported by the system in which case the - default vector length is set to that maximum. + default vector length to the specified value rounded to a supported value + using the same rules as for setting vector length via prctl(). The result can be determined by reopening the file and reading its contents.