[PATCH v3 01/26] arm64/cpuinfo: Restore define for AIVIVT cache type

Mark Brown broonie at kernel.org
Thu Jun 9 10:08:35 PDT 2022


In 155433cb365ee466 ("arm64: cache: Remove support for ASID-tagged VIVT
I-caches") we removed all the support fir AIVIVT cache types and renamed
all references to the field to say "unknown" since support for AIVIVT
caches was removed from the architecture. Since the correspoding removal
from the architecture was done by documenting this value as reserved but
still listing the original meaning and naming in order to facilitiate
automatic generation of the headers for the system registers rename the
kernel internal defines back to AIVIVT. The decoded value displayed to
userspace is left as "RESERVED/UNKNOWN" so there is no user visible
impact.

Signed-off-by: Mark Brown <broonie at kernel.org>
---
 arch/arm64/include/asm/cache.h | 2 +-
 arch/arm64/kernel/cpuinfo.c    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h
index 7c2181c72116..23bfcd92f6ca 100644
--- a/arch/arm64/include/asm/cache.h
+++ b/arch/arm64/include/asm/cache.h
@@ -25,7 +25,7 @@
 #define CTR_L1IP(ctr)		(((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK)
 
 #define ICACHE_POLICY_VPIPT	0
-#define ICACHE_POLICY_RESERVED	1
+#define ICACHE_POLICY_AIVIVT	1
 #define ICACHE_POLICY_VIPT	2
 #define ICACHE_POLICY_PIPT	3
 
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 8eff0a34ffd4..e3990b39126d 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -35,7 +35,7 @@ static struct cpuinfo_arm64 boot_cpu_data;
 
 static const char *icache_policy_str[] = {
 	[ICACHE_POLICY_VPIPT]		= "VPIPT",
-	[ICACHE_POLICY_RESERVED]	= "RESERVED/UNKNOWN",
+	[ICACHE_POLICY_AIVIVT]		= "RESERVED/UNKNOWN",
 	[ICACHE_POLICY_VIPT]		= "VIPT",
 	[ICACHE_POLICY_PIPT]		= "PIPT",
 };
@@ -347,7 +347,7 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
 	case ICACHE_POLICY_VPIPT:
 		set_bit(ICACHEF_VPIPT, &__icache_flags);
 		break;
-	case ICACHE_POLICY_RESERVED:
+	case ICACHE_POLICY_AIVIVT:
 	case ICACHE_POLICY_VIPT:
 		/* Assume aliasing */
 		set_bit(ICACHEF_ALIASING, &__icache_flags);
-- 
2.30.2




More information about the linux-arm-kernel mailing list