All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Vladimir Murzin <vladimir.murzin@arm.com>
Subject: [PATCH 5/5] arm64: Remove CONFIG_ARM64_CNP
Date: Thu,  1 Jun 2023 15:24:29 +0100	[thread overview]
Message-ID: <20230601142429.12835-6-maz@kernel.org> (raw)
In-Reply-To: <20230601142429.12835-1-maz@kernel.org>

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@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-06-01 14:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 14:24 [PATCH 0/5] arm64: Get rid of CnP Marc Zyngier
2023-06-01 14:24 ` [PATCH 1/5] arm64: Remove CnP detection Marc Zyngier
2023-06-01 14:24 ` [PATCH 2/5] arm64: Drop NVIDIA Carmel CnP workaround Marc Zyngier
2023-06-01 14:24 ` [PATCH 3/5] arm64: Drop support for CnP Marc Zyngier
2023-06-01 14:24 ` [PATCH 4/5] KVM: arm64: Remove CnP usage Marc Zyngier
2023-06-01 14:24 ` Marc Zyngier [this message]
2023-06-01 14:31 ` [PATCH 0/5] arm64: Get rid of CnP Marc Zyngier
2023-06-01 14:31   ` Marc Zyngier
2023-06-02  8:41 ` Vladimir Murzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230601142429.12835-6-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.