]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: capabilities: Add support for features enabled early
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 26 Mar 2018 14:12:41 +0000 (15:12 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 26 Mar 2018 17:01:41 +0000 (18:01 +0100)
commitdea3ba3676cca248cb8c2c3bc0e77134c4a5c54f
treebf915e33b06a8bb5c8d543e14967fcbc508949bf
parent33c96962978bdd96e2d6e34f2f6be455fa5a2465
arm64: capabilities: Add support for features enabled early

The kernel detects and uses some of the features based on the boot
CPU and expects that all the following CPUs conform to it. e.g,
with VHE and the boot CPU running at EL2, the kernel decides to
keep the kernel running at EL2. If another CPU is brought up without
this capability, we use custom hooks (via check_early_cpu_features())
to handle it. To handle such capabilities add support for detecting
and enabling capabilities based on the boot CPU.

A bit is added to indicate if the capability should be detected
early on the boot CPU. The infrastructure then ensures that such
capabilities are probed and "enabled" early on in the boot CPU
and, enabled on the subsequent CPUs.

Cc: Julien Thierry <julien.thierry@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Dave Martin <dave.martin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c