arm64: Kill detection of VPIPT i-cache policy
authorMarc Zyngier <maz@kernel.org>
Mon, 4 Dec 2023 14:36:05 +0000 (14:36 +0000)
committerWill Deacon <will@kernel.org>
Tue, 5 Dec 2023 11:38:03 +0000 (11:38 +0000)
Since the kernel will never run on a system with the VPIPT i-cache
policy, drop the detection code altogether.

Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20231204143606.1806432-3-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cache.h
arch/arm64/kernel/cpuinfo.c

index ceb368d33bf4eae8a054c16e54d578afde28e2f5..06a4670bdb0b9b7552d553cee3cc70a6e15b2b93 100644 (file)
@@ -58,7 +58,6 @@ static inline unsigned int arch_slab_minalign(void)
 #define CTR_L1IP(ctr)          SYS_FIELD_GET(CTR_EL0, L1Ip, ctr)
 
 #define ICACHEF_ALIASING       0
-#define ICACHEF_VPIPT          1
 extern unsigned long __icache_flags;
 
 /*
@@ -70,11 +69,6 @@ static inline int icache_is_aliasing(void)
        return test_bit(ICACHEF_ALIASING, &__icache_flags);
 }
 
-static __always_inline int icache_is_vpipt(void)
-{
-       return test_bit(ICACHEF_VPIPT, &__icache_flags);
-}
-
 static inline u32 cache_type_cwg(void)
 {
        return SYS_FIELD_GET(CTR_EL0, CWG, read_cpuid_cachetype());
index a257da7b56fe6ae6492c99ccdcfed33792e72e3e..47043c0d95ec3d5d1c4bcfba9766b57a8aca5266 100644 (file)
@@ -36,8 +36,6 @@ static struct cpuinfo_arm64 boot_cpu_data;
 static inline const char *icache_policy_str(int l1ip)
 {
        switch (l1ip) {
-       case CTR_EL0_L1Ip_VPIPT:
-               return "VPIPT";
        case CTR_EL0_L1Ip_VIPT:
                return "VIPT";
        case CTR_EL0_L1Ip_PIPT:
@@ -388,9 +386,6 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
        switch (l1ip) {
        case CTR_EL0_L1Ip_PIPT:
                break;
-       case CTR_EL0_L1Ip_VPIPT:
-               set_bit(ICACHEF_VPIPT, &__icache_flags);
-               break;
        case CTR_EL0_L1Ip_VIPT:
        default:
                /* Assume aliasing */