All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Joey Gouly <joey.gouly@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <nd@arm.com>,
	<alexandru.elisei@arm.com>, <catalin.marinas@arm.com>,
	<corbet@lwn.net>, <james.morse@arm.com>, <reijiw@google.com>,
	<suzuki.poulose@arm.com>, <will@kernel.org>
Subject: Re: [PATCH v2 2/3] arm64: add ID_AA64ISAR2_EL1 sys register
Date: Tue, 07 Dec 2021 12:54:32 +0000	[thread overview]
Message-ID: <87lf0w1son.wl-maz@kernel.org> (raw)
In-Reply-To: <20211207124226.50095-3-joey.gouly@arm.com>

Hi Joey,

On Tue, 07 Dec 2021 12:42:25 +0000,
Joey Gouly <joey.gouly@arm.com> wrote:
> 
> This is a new ID register, introduced in 8.7.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: James Morse <james.morse@arm.com>
> Cc: Alexandru Elisei <alexandru.elisei@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Reiji Watanabe <reijiw@google.com>
> ---
>  arch/arm64/include/asm/cpu.h    |  1 +
>  arch/arm64/include/asm/sysreg.h | 10 ++++++++++
>  arch/arm64/kernel/cpufeature.c  |  9 +++++++++
>  arch/arm64/kernel/cpuinfo.c     |  1 +
>  arch/arm64/kvm/sys_regs.c       |  2 +-
>  5 files changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h
> index 0f6d16faa540..a58e366f0b07 100644
> --- a/arch/arm64/include/asm/cpu.h
> +++ b/arch/arm64/include/asm/cpu.h
> @@ -51,6 +51,7 @@ struct cpuinfo_arm64 {
>  	u64		reg_id_aa64dfr1;
>  	u64		reg_id_aa64isar0;
>  	u64		reg_id_aa64isar1;
> +	u64		reg_id_aa64isar2;
>  	u64		reg_id_aa64mmfr0;
>  	u64		reg_id_aa64mmfr1;
>  	u64		reg_id_aa64mmfr2;
> diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
> index adcab9009f9d..5393a00340f5 100644
> --- a/arch/arm64/include/asm/sysreg.h
> +++ b/arch/arm64/include/asm/sysreg.h
> @@ -182,6 +182,7 @@
>  
>  #define SYS_ID_AA64ISAR0_EL1		sys_reg(3, 0, 0, 6, 0)
>  #define SYS_ID_AA64ISAR1_EL1		sys_reg(3, 0, 0, 6, 1)
> +#define SYS_ID_AA64ISAR2_EL1		sys_reg(3, 0, 0, 6, 2)
>  
>  #define SYS_ID_AA64MMFR0_EL1		sys_reg(3, 0, 0, 7, 0)
>  #define SYS_ID_AA64MMFR1_EL1		sys_reg(3, 0, 0, 7, 1)
> @@ -771,6 +772,15 @@
>  #define ID_AA64ISAR1_GPI_NI			0x0
>  #define ID_AA64ISAR1_GPI_IMP_DEF		0x1
>  
> +/* id_aa64isar2 */
> +#define ID_AA64ISAR2_RPRES_SHIFT	4
> +#define ID_AA64ISAR2_WFXT_SHIFT		0
> +
> +#define ID_AA64ISAR2_RPRES_8BIT		0x0
> +#define ID_AA64ISAR2_RPRES_12BIT	0x1
> +#define ID_AA64ISAR2_WFXT_NI		0x0
> +#define ID_AA64ISAR2_WFXT_SUPPORTED	0x2

Maybe I wasn't clear in my earlier comment: you need to enumerate all
the architecturally valid values:

#define ID_AA64ISAR2_WFXT_NI		0x0
#define ID_AA64ISAR2_WFXT_V1		0x1
#define ID_AA64ISAR2_WFXT_V2		0x2

where WFXT_V1 represent the original FEAT_WFxT, and WFXT_V2 the new,
more usable FEAT_WFxT2. Even if the original FEAT_WFxT is deprecated,
it still exists, and is still the only mandatory option for v8.7.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-12-07 12:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 12:42 [PATCH v2 0/3] arm64: Add two HWCAPs for Arm v8.7 FP behaviour Joey Gouly
2021-12-07 12:42 ` [PATCH v2 1/3] arm64: cpufeature: add HWCAP for FEAT_AFP Joey Gouly
2021-12-07 12:42 ` [PATCH v2 2/3] arm64: add ID_AA64ISAR2_EL1 sys register Joey Gouly
2021-12-07 12:54   ` Marc Zyngier [this message]
2021-12-07 14:31     ` Joey Gouly
2021-12-07 14:49       ` Marc Zyngier
2021-12-07 15:38         ` Joey Gouly
2021-12-07 12:42 ` [PATCH v2 3/3] arm64: cpufeature: add HWCAP for FEAT_RPRES Joey Gouly

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=87lf0w1son.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alexandru.elisei@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=nd@arm.com \
    --cc=reijiw@google.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.