Re: [PATCH v7 1/4] arm64: cpufeature: Introduce MATCH_ALL_EARLY_CPUS capability type

From: Suzuki K Poulose
Date: Tue Jun 17 2025 - 06:20:53 EST


On 17/06/2025 10:51, Mikołaj Lenczewski wrote:
From: Catalin Marinas <catalin.marinas@xxxxxxx>

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: Catalin Marinas <catalin.marinas@xxxxxxx>
Signed-off-by: Mikołaj Lenczewski <miko.lenczewski@xxxxxxx>
Cc: Suzuki K Poulose <Suzuki.Poulose@xxxxxxx>
---

Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>