arm64: Add cpus_have_final_boot_cap()
authorMark Rutland <mark.rutland@arm.com>
Mon, 16 Oct 2023 10:24:28 +0000 (11:24 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 16 Oct 2023 11:57:49 +0000 (12:57 +0100)
commit7bf46aa1c9cbd85e173a9ab8cbf6d7092c388947
tree33b8048fe0d09d722c6f7303b58aadf79adb91db
parentde66cb37ab6488d78d4b415504ad1fcd0910bae5
arm64: Add cpus_have_final_boot_cap()

The cpus_have_final_cap() function can be used to test a cpucap while
also verifying that we do not consume the cpucap until system
capabilities have been finalized. It would be helpful if we could do
likewise for boot cpucaps.

This patch adds a new cpus_have_final_boot_cap() helper which can be
used to test a cpucap while also verifying that boot capabilities have
been finalized. Users will be added in subsequent patches.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpufeature.h