From: Mark Rutland <mark.rutland@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
James Morse <james.morse@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] arm64/cpufeature: Fix field sign for DIT hwcap detection
Date: Fri, 9 Dec 2022 12:25:26 +0000 [thread overview]
Message-ID: <Y5MpNpqOFW/oDI4x@FVFF77S0Q05N> (raw)
In-Reply-To: <20221207-arm64-sysreg-helpers-v1-1-149fa1308a23@kernel.org>
On Thu, Dec 08, 2022 at 04:03:22PM +0000, Mark Brown wrote:
> Since it was added our hwcap for DIT has specified that DIT is a signed
> field but this appears to be incorrect, the two values for the enumeration
> are:
>
> 0b0000 NI
> 0b0001 IMP
>
> which look like a normal signed enumeration and the in-kernel DIT usage
> added by 01ab991fc0ee ("arm64: Enable data independent timing (DIT) in the
> kernel") detects the feature with a signed enum. Fix the hwcap to specify
> the field as signed.
s/signed/unsigned/ for the three instances after the values.
> Fixes: 7206dc93a58f ("arm64: Expose Arm v8.4 features")
> Signed-off-by: Mark Brown <broonie@kernel.org>
Yup, that should definitely be UNSIGNED. Luckily this wouldn't blow up unless
we had 7+ revisions to the DIT feature, but it should still be fixed.
The other fields added in that original commit all look correct to me.
With the s/signed/unsigned/ foxup above:
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Mark.
> ---
> arch/arm64/kernel/cpufeature.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 7e76e1fda2a1..c687b0052a3f 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -2775,7 +2775,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
> HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_FP_SHIFT, 4, FTR_SIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_FPHP),
> HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_AdvSIMD_SHIFT, 4, FTR_SIGNED, 0, CAP_HWCAP, KERNEL_HWCAP_ASIMD),
> HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_AdvSIMD_SHIFT, 4, FTR_SIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_ASIMDHP),
> - HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_DIT_SHIFT, 4, FTR_SIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_DIT),
> + HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_DIT_SHIFT, 4, FTR_UNSIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_DIT),
> HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_DPB_SHIFT, 4, FTR_UNSIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_DCPOP),
> HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_DPB_SHIFT, 4, FTR_UNSIGNED, 2, CAP_HWCAP, KERNEL_HWCAP_DCPODP),
> HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_JSCVT_SHIFT, 4, FTR_UNSIGNED, 1, CAP_HWCAP, KERNEL_HWCAP_JSCVT),
>
> --
> 2.30.2
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
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-12-09 12:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 16:03 [PATCH 0/6] arm64/cpufeature: Make use of sysreg helpers for hwcaps Mark Brown
2022-12-08 16:03 ` [PATCH 1/6] arm64/cpufeature: Fix field sign for DIT hwcap detection Mark Brown
2022-12-09 12:25 ` Mark Rutland [this message]
2022-12-09 13:49 ` Mark Brown
2022-12-08 16:03 ` [PATCH 2/6] arm64/sysreg: Fix errors in 32 bit enumeration values Mark Brown
2022-12-09 12:29 ` Mark Rutland
2022-12-08 16:03 ` [PATCH 3/6] arm64/sysreg: Allow enumerations to be declared as signed Mark Brown
2022-12-09 12:34 ` Mark Rutland
2022-12-09 13:55 ` Mark Brown
2022-12-08 16:03 ` [PATCH 4/6] arm64/sysreg: Annotate signed enumerations Mark Brown
2022-12-09 12:42 ` Mark Rutland
2022-12-09 13:33 ` Mark Brown
2022-12-09 16:03 ` Mark Rutland
2022-12-08 16:03 ` [PATCH 5/6] arm64/cpufeature: Always use symbolic name for feature value in hwcaps Mark Brown
2022-12-09 12:48 ` Mark Rutland
2022-12-08 16:03 ` [PATCH 6/6] arm64/cpufeature: Use helper macros to specify hwcaps Mark Brown
2022-12-09 12:51 ` 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=Y5MpNpqOFW/oDI4x@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/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