Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Expose DC CVAP to userspace

The ARMv8.2-DCPoP feature introduces persistent memory support to the
architecture, by defining a point of persistence in the memory
hierarchy, and a corresponding cache maintenance operation, DC CVAP.
Expose the support via HWCAP and MRS emulation.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Robin Murphy and committed by
Catalin Marinas
7aac405e d46befef

+7
+2
Documentation/arm64/cpu-feature-registers.txt
··· 179 179 | FCMA | [19-16] | y | 180 180 |--------------------------------------------------| 181 181 | JSCVT | [15-12] | y | 182 + |--------------------------------------------------| 183 + | DPB | [3-0] | y | 182 184 x--------------------------------------------------x 183 185 184 186 Appendix I: Example
+1
arch/arm64/include/asm/sysreg.h
··· 329 329 #define ID_AA64ISAR1_LRCPC_SHIFT 20 330 330 #define ID_AA64ISAR1_FCMA_SHIFT 16 331 331 #define ID_AA64ISAR1_JSCVT_SHIFT 12 332 + #define ID_AA64ISAR1_DPB_SHIFT 0 332 333 333 334 /* id_aa64pfr0 */ 334 335 #define ID_AA64PFR0_GIC_SHIFT 24
+1
arch/arm64/include/uapi/asm/hwcap.h
··· 35 35 #define HWCAP_JSCVT (1 << 13) 36 36 #define HWCAP_FCMA (1 << 14) 37 37 #define HWCAP_LRCPC (1 << 15) 38 + #define HWCAP_DCPOP (1 << 16) 38 39 39 40 #endif /* _UAPI__ASM_HWCAP_H */
+2
arch/arm64/kernel/cpufeature.c
··· 120 120 ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_LRCPC_SHIFT, 4, 0), 121 121 ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_FCMA_SHIFT, 4, 0), 122 122 ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_JSCVT_SHIFT, 4, 0), 123 + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, ID_AA64ISAR1_DPB_SHIFT, 4, 0), 123 124 ARM64_FTR_END, 124 125 }; 125 126 ··· 917 916 HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_FPHP), 918 917 HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_ASIMD), 919 918 HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_ASIMDHP), 919 + HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_DPB_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_DCPOP), 920 920 HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_JSCVT_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_JSCVT), 921 921 HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_FCMA_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_FCMA), 922 922 HWCAP_CAP(SYS_ID_AA64ISAR1_EL1, ID_AA64ISAR1_LRCPC_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_LRCPC),
+1
arch/arm64/kernel/cpuinfo.c
··· 68 68 "jscvt", 69 69 "fcma", 70 70 "lrcpc", 71 + "dcpop", 71 72 NULL 72 73 }; 73 74