[PATCH 5/5] arm64: Remove CONFIG_ARM64_CNP
Marc Zyngier
maz at kernel.org
Thu Jun 1 07:24:29 PDT 2023
Now that all the users of CnP are gone, let's perform a final
cleanup by removing the Kconfig entry, the CPU feature, and
the system_supports_cnp() helper.
The only traces left of CnP are ID register definitions, the feature
detection, and the bit definitions. All of which serve as documentation
and can be safely kept.
Signed-off-by: Marc Zyngier <maz at kernel.org>
---
arch/arm64/Kconfig | 14 --------------
arch/arm64/include/asm/cpufeature.h | 6 ------
arch/arm64/tools/cpucaps | 1 -
3 files changed, 21 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 41125ff8ae69..02318ad49a6f 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1818,20 +1818,6 @@ config ARM64_RAS_EXTN
and access the new registers if the system supports the extension.
Platform RAS features may additionally depend on firmware support.
-config ARM64_CNP
- bool "Enable support for Common Not Private (CNP) translations"
- default y
- depends on ARM64_PAN || !ARM64_SW_TTBR0_PAN
- help
- Common Not Private (CNP) allows translation table entries to
- be shared between different PEs in the same inner shareable
- domain, so the hardware can use this fact to optimise the
- caching of such entries in the TLB.
-
- Selecting this option allows the CNP feature to be detected
- at runtime, and does not affect PEs that do not implement
- this feature.
-
endmenu # "ARMv8.2 architectural features"
menu "ARMv8.3 architectural features"
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index 6bf013fb110d..172f3d01ef9b 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -786,12 +786,6 @@ static __always_inline bool system_supports_tpidr2(void)
return system_supports_sme();
}
-static __always_inline bool system_supports_cnp(void)
-{
- return IS_ENABLED(CONFIG_ARM64_CNP) &&
- cpus_have_const_cap(ARM64_HAS_CNP);
-}
-
static inline bool system_supports_address_auth(void)
{
return IS_ENABLED(CONFIG_ARM64_PTR_AUTH) &&
diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps
index a94808ba819c..b5111f76bc72 100644
--- a/arch/arm64/tools/cpucaps
+++ b/arch/arm64/tools/cpucaps
@@ -16,7 +16,6 @@ HAS_AMU_EXTN
HAS_ARMv8_4_TTL
HAS_CACHE_DIC
HAS_CACHE_IDC
-HAS_CNP
HAS_CRC32
HAS_DCPODP
HAS_DCPOP
--
2.39.2
More information about the linux-arm-kernel
mailing list