[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3e9a322-6830-c23e-cda6-80632c84442f@arm.com>
Date: Tue, 19 May 2020 12:13:19 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: anshuman.khandual@....com, linux-arm-kernel@...ts.infradead.org
Cc: catalin.marinas@....com, will@...nel.org, maz@...nel.org,
mark.rutland@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V4 11/17] arm64/cpufeature: Add remaining feature bits in
ID_AA64PFR1 register
On 05/19/2020 10:40 AM, Anshuman Khandual wrote:
> Enable the following features bits in ID_AA64PFR1 register as per ARM DDI
> 0487F.a specification.
>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Suzuki K Poulose <suzuki.poulose@....com>
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
>
> Suggested-by: Will Deacon <will@...nel.org>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
> arch/arm64/include/asm/sysreg.h | 4 ++++
> arch/arm64/kernel/cpufeature.c | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
> index 638f6108860f..fa9d02ca4b25 100644
> --- a/arch/arm64/include/asm/sysreg.h
> +++ b/arch/arm64/include/asm/sysreg.h
> @@ -670,7 +670,11 @@
> #define ID_AA64PFR0_EL0_32BIT_64BIT 0x2
>
> /* id_aa64pfr1 */
> +#define ID_AA64PFR1_MPAMFRAC_SHIFT 16
> +#define ID_AA64PFR1_RASFRAC_SHIFT 12
> +#define ID_AA64PFR1_MTE_SHIFT 8
> #define ID_AA64PFR1_SSBS_SHIFT 4
> +#define ID_AA64PFR1_BT_SHIFT 0
nit: You may remove this BT_SHIFT if you don't use it.
Reviewed-by: Suzuki K Poulose <suzuki.poulose@....com>
>
> #define ID_AA64PFR1_SSBS_PSTATE_NI 0
> #define ID_AA64PFR1_SSBS_PSTATE_ONLY 1
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 39fd6cc64796..d1433f996710 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -238,6 +238,8 @@ static const struct arm64_ftr_bits ftr_id_aa64pfr0[] = {
> };
>
> static const struct arm64_ftr_bits ftr_id_aa64pfr1[] = {
> + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_MPAMFRAC_SHIFT, 4, 0),
> + ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_RASFRAC_SHIFT, 4, 0),
> ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_SSBS_SHIFT, 4, ID_AA64PFR1_SSBS_PSTATE_NI),
> ARM64_FTR_END,
> };
>
Powered by blists - more mailing lists