]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: cpufeature: Introduce MATCH_ALL_EARLY_CPUS capability type
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 25 Jun 2025 11:34:32 +0000 (11:34 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 30 Jun 2025 16:42:03 +0000 (17:42 +0100)
commit3eb06f6ce3af65df4e9b3d8fc1d711fbfe7673b3
tree06d3c165354ba6502e4b8d606616c2790a0efbce
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
arm64: cpufeature: Introduce MATCH_ALL_EARLY_CPUS capability type

For system-wide capabilities, the kernel has the SCOPE_SYSTEM type. Such
capabilities are checked once the SMP boot has completed using the
sanitised ID registers. However, there is a need for a new capability
type similar in scope to the system one but with checking performed
locally on each CPU during boot (e.g. based on MIDR_EL1 which is not a
sanitised register).

Introduce ARM64_CPUCAP_MATCH_ALL_EARLY_CPUS which, together with
ARM64_CPUCAP_SCOPE_LOCAL_CPU, ensures that such capability is enabled
only if all early CPUs have it. For ease of use, define
ARM64_CPUCAP_EARLY_LOCAL_CPU_FEATURE which combines SCOPE_LOCAL_CPU,
PERMITTED_FOR_LATE_CPUS and MATCH_ALL_EARLY_CPUS.

Signed-off-by: MikoĊ‚aj Lenczewski <miko.lenczewski@arm.com>
Reviewed-by: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Link: https://lore.kernel.org/r/20250625113435.26849-2-miko.lenczewski@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c