From: Andre Przywara <andre.przywara@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, broonie@kernel.org,
jaxson.han@arm.com, robin.murphy@arm.com,
vladimir.murzin@arm.com, wei.chen@arm.com
Subject: Re: [bootwrapper PATCH v3 01/15] aarch64: correct ZCR_EL3.LEN initialization
Date: Wed, 26 Jan 2022 15:02:50 +0000 [thread overview]
Message-ID: <20220126150250.2dd88556@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <20220125150057.3936090-2-mark.rutland@arm.com>
On Tue, 25 Jan 2022 15:00:43 +0000
Mark Rutland <mark.rutland@arm.com> wrote:
> The ZCR_ELx.LEN field covers bits[3:0] of ZCR_ELx, and bits[8:4] are
> RAZ/WI, likely so that in future these can be used to extend LEN without
> complicating the probing of the maximum available vector length.
>
> Currently ZCR_EL3_LEN_MASK is defined as 0x1ff, covering both the LEN
> field and the RAZ/WI bits.
>
> To match the architecture as documented, reduce this down to 0xf, only
> covering the bits currently allocated to the LEN field. We can extend
> this in future if the LEN field is widened.
>
> As the same time, rename ZCR_EL3_LEN_MASK to ZCR_EL3_LEN_MAX, as it is
> used as a value rather than as a bit mask.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Mark Brown <broonie@kernel.org>
Looks good to me:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> arch/aarch64/boot.S | 2 +-
> arch/aarch64/include/asm/cpu.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
> index 72c6b79..ee9ddaa 100644
> --- a/arch/aarch64/boot.S
> +++ b/arch/aarch64/boot.S
> @@ -123,7 +123,7 @@ ASM_FUNC(_start)
> msr cptr_el3, x0
> isb
>
> - mov x0, #ZCR_EL3_LEN_MASK // SVE: Enable full vector len
> + mov x0, #ZCR_EL3_LEN_MAX // SVE: Enable full vector len
> msr ZCR_EL3, x0 // for EL2.
>
> 1:
> diff --git a/arch/aarch64/include/asm/cpu.h b/arch/aarch64/include/asm/cpu.h
> index 63eb1c3..e3269b8 100644
> --- a/arch/aarch64/include/asm/cpu.h
> +++ b/arch/aarch64/include/asm/cpu.h
> @@ -30,7 +30,7 @@
> #define CPTR_EL3_EZ (1 << 8)
>
> #define ZCR_EL3 s3_6_c1_c2_0
> -#define ZCR_EL3_LEN_MASK 0x1ff
> +#define ZCR_EL3_LEN_MAX 0xf
>
> #define SCTLR_EL1_CP15BEN (1 << 5)
> #define SCTLR_EL1_RES1 (3 << 28 | 3 << 22 | 1 << 11)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-26 15:19 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 15:00 [bootwrapper PATCH v3 00/15] Cleanups and improvements Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 01/15] aarch64: correct ZCR_EL3.LEN initialization Mark Rutland
2022-01-25 15:59 ` Mark Brown
2022-01-25 16:33 ` Mark Rutland
2022-01-25 17:44 ` Mark Brown
2022-01-27 16:08 ` Mark Rutland
2022-01-27 18:55 ` Mark Brown
2022-01-28 10:03 ` Mark Rutland
2022-01-28 12:41 ` Mark Brown
2022-01-26 15:02 ` Andre Przywara [this message]
2022-01-25 15:00 ` [bootwrapper PATCH v3 02/15] aarch64: correct SCTLR_EL1_KERNEL for AA32 kernels Mark Rutland
2022-01-26 15:03 ` Andre Przywara
2022-01-27 15:52 ` Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 03/15] Document entry requirements Mark Rutland
2022-01-26 15:03 ` Andre Przywara
2022-01-25 15:00 ` [bootwrapper PATCH v3 04/15] Add bit-field macros Mark Rutland
2022-01-26 15:03 ` Andre Przywara
2022-01-27 16:11 ` Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 05/15] aarch64: add system register accessors Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 06/15] aarch32: add coprocessor accessors Mark Rutland
2022-01-26 16:35 ` Andre Przywara
2022-01-25 15:00 ` [bootwrapper PATCH v3 07/15] aarch64: add mov_64 macro Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 08/15] aarch64: initialize SCTLR_ELx for the boot-wrapper Mark Rutland
2022-01-26 16:35 ` Andre Przywara
2022-01-25 15:00 ` [bootwrapper PATCH v3 09/15] Rework common init C code Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 10/15] Announce boot-wrapper mode / exception level Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 11/15] aarch64: move the bulk of EL3 initialization to C Mark Rutland
2022-01-26 16:36 ` Andre Przywara
2022-01-25 15:00 ` [bootwrapper PATCH v3 12/15] aarch32: move the bulk of Secure PL1 " Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 13/15] Announce locations of memory objects Mark Rutland
2022-01-25 15:00 ` [bootwrapper PATCH v3 14/15] Rework bootmethod initialization Mark Rutland
2022-01-26 16:36 ` Andre Przywara
2022-01-25 15:00 ` [bootwrapper PATCH v3 15/15] Unify start_el3 & start_no_el3 Mark Rutland
2022-01-28 15:50 ` [bootwrapper PATCH v3 00/15] Cleanups and improvements 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=20220126150250.2dd88556@donnerap.cambridge.arm.com \
--to=andre.przywara@arm.com \
--cc=broonie@kernel.org \
--cc=jaxson.han@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=vladimir.murzin@arm.com \
--cc=wei.chen@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 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).