@@ -1666,6 +1666,16 @@ config ARCH_RANDOM
endmenu
+menu "ARMv8.6 architectural features"
+
+config ARM64_TWED
+ bool "Enable suppot for delayed trapping of WFE"
+ default y
+ help
+ Delayed Trapping of WFE (part of the ARMv8.6 Extensions)
+
+endmenu
+
config ARM64_SVE
bool "ARM Scalable Vector Extension support"
default y
@@ -64,7 +64,8 @@
#define ARM64_BTI 54
#define ARM64_HAS_ARMv8_4_TTL 55
#define ARM64_HAS_TLB_RANGE 56
+#define ARM64_HAS_TWED 57
-#define ARM64_NCAPS 57
+#define ARM64_NCAPS 58
#endif /* __ASM_CPUCAPS_H */
@@ -2120,6 +2120,18 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
.min_field_value = ID_AA64PFR1_BT_BTI,
.sign = FTR_UNSIGNED,
},
+#endif
+#ifdef CONFIG_ARM64_TWED
+ {
+ .desc = "Delayed Trapping of WFE",
+ .capability = ARM64_HAS_TWED,
+ .type = ARM64_CPUCAP_SYSTEM_FEATURE,
+ .matches = has_cpuid_feature,
+ .sys_reg = SYS_ID_AA64MMFR1_EL1,
+ .field_pos = ID_AA64MMFR1_TWED_SHIFT,
+ .sign = FTR_UNSIGNED,
+ .min_field_value = 1,
+ },
#endif
{},
};