提交 9180cc11 编写于 作者: Z Zhenyu Ye 提交者: Yang Yingliang

arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature

mainline inclusion
from mainline-v5.8
commit b620ba54
category: feature
CVE: NA

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

ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
range of input addresses. This patch detect this feature.
Signed-off-by: NZhenyu Ye <yezhenyu2@huawei.com>
Link: https://lore.kernel.org/r/20200715071945.897-2-yezhenyu2@huawei.com
[catalin.marinas@arm.com: some renaming for consistency]
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: NYuan Can <yuancan@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 e055f973
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
#define ARM64_HAS_CNP 47 #define ARM64_HAS_CNP 47
#define ARM64_HAS_ARMv8_4_TTL 48 #define ARM64_HAS_ARMv8_4_TTL 48
#define ARM64_HAS_DCPODP 49 #define ARM64_HAS_DCPODP 49
#define ARM64_HAS_TLB_RANGE 50
#define ARM64_NCAPS 50 #define ARM64_NCAPS 51
#endif /* __ASM_CPUCAPS_H */ #endif /* __ASM_CPUCAPS_H */
...@@ -546,6 +546,9 @@ ...@@ -546,6 +546,9 @@
#define ID_AA64ISAR0_SHA1_SHIFT 8 #define ID_AA64ISAR0_SHA1_SHIFT 8
#define ID_AA64ISAR0_AES_SHIFT 4 #define ID_AA64ISAR0_AES_SHIFT 4
#define ID_AA64ISAR0_TLB_RANGE_NI 0x0
#define ID_AA64ISAR0_TLB_RANGE 0x2
/* id_aa64isar1 */ /* id_aa64isar1 */
#define ID_AA64ISAR1_SB_SHIFT 36 #define ID_AA64ISAR1_SB_SHIFT 36
#define ID_AA64ISAR1_GPI_SHIFT 28 #define ID_AA64ISAR1_GPI_SHIFT 28
......
...@@ -1574,6 +1574,16 @@ static const struct arm64_cpu_capabilities arm64_features[] = { ...@@ -1574,6 +1574,16 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
.min_field_value = 1, .min_field_value = 1,
.matches = has_cpuid_feature, .matches = has_cpuid_feature,
}, },
{
.desc = "TLB range maintenance instructions",
.capability = ARM64_HAS_TLB_RANGE,
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
.matches = has_cpuid_feature,
.sys_reg = SYS_ID_AA64ISAR0_EL1,
.field_pos = ID_AA64ISAR0_TLB_SHIFT,
.sign = FTR_UNSIGNED,
.min_field_value = ID_AA64ISAR0_TLB_RANGE,
},
#ifdef CONFIG_ARM64_HW_AFDBM #ifdef CONFIG_ARM64_HW_AFDBM
{ {
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册