Commit c00c6ce6 authored by Marc Zyngier's avatar Marc Zyngier Committed by Kunkun Jiang
Browse files

arm64: Add HWCAP advertising FEAT_WFXT

mainline inclusion
from mainline-v5.19-rc1
commit 69bb02eb
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6YAMV
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=69bb02ebc38ace438c9cd7c5315cfe43862b51fe



-------------------------------

In order to allow userspace to enjoy WFET, add a new HWCAP that
advertises it when available.

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419182755.601427-9-maz@kernel.org


Signed-off-by: default avatarKunkun Jiang <jiangkunkun@huawei.com>
parent da0fcf7a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -290,6 +290,8 @@ infrastructure:
     +------------------------------+---------+---------+
     | RPRES                        | [7-4]   |    y    |
     +------------------------------+---------+---------+
     | WFXT                         | [3-0]   |    y    |
     +------------------------------+---------+---------+


Appendix I: Example
+4 −0
Original line number Diff line number Diff line
@@ -257,6 +257,10 @@ HWCAP2_RPRES

    Functionality implied by ID_AA64ISAR2_EL1.RPRES == 0b0001.

HWCAP2_WFXT

    Functionality implied by ID_AA64ISAR2_EL1.WFXT == 0b0010.

4. Unused AT_HWCAP bits
-----------------------

+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@
#define ARM64_HAS_EPAN				65
#define ARM64_SPECTRE_BHB			66
#define ARM64_WORKAROUND_1742098	67
#define ARM64_HAS_WFXT				68

#define ARM64_NCAPS				80

+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@
#define KERNEL_HWCAP_ECV		__khwcap2_feature(ECV)
#define KERNEL_HWCAP_AFP		__khwcap2_feature(AFP)
#define KERNEL_HWCAP_RPRES		__khwcap2_feature(RPRES)
#define KERNEL_HWCAP_WFXT		__khwcap2_feature(WFXT)

/*
 * This yields a mask that user programs can use to figure out what
+1 −0
Original line number Diff line number Diff line
@@ -78,5 +78,6 @@
#define HWCAP2_ECV		(1 << 19)
#define HWCAP2_AFP		(1 << 20)
#define HWCAP2_RPRES		(1 << 21)
#define HWCAP2_WFXT		(1 << 23)

#endif /* _UAPI__ASM_HWCAP_H */
Loading