提交 1d939330 编写于 作者: Z Zengruan Ye 提交者: Zheng Zengkai

arm64: cpufeature: TWED support detection

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I40FGG
CVE: NA

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

TWE Delay is an optional feature in ARMv8.6 Extensions. This patch
detect this feature.
Signed-off-by: NZengruan Ye <yezengruan@huawei.com>
Signed-off-by: NJingyi Wang <wangjingyi11@huawei.com>
Reviewed-by: NKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d7b8dcbe
......@@ -1794,6 +1794,16 @@ config ARM64_MTE
endmenu
menu "ARMv8.6 architectural features"
config ARM64_TWED
bool "Enable support 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
......
......@@ -69,7 +69,8 @@
#define ARM64_HAS_MPAM 59
#define ARM64_WORKAROUND_HISI_HIP08_RU_PREFETCH 60
#define ARM64_CLEARPAGE_STNP 61
#define ARM64_HAS_TWED 62
#define ARM64_NCAPS 62
#define ARM64_NCAPS 63
#endif /* __ASM_CPUCAPS_H */
......@@ -2192,6 +2192,18 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
.matches = can_clearpage_use_stnp,
},
#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
{},
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册