]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Add hypervisor safe helper for checking constant capabilities
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 8 Nov 2016 13:56:20 +0000 (13:56 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 16 Nov 2016 17:50:51 +0000 (17:50 +0000)
commit36b5e59673a8218aedd391e802d753550f1bfff6
treeef2638d37291c56d972f20b69c59a6dee9292c18
parent809e3ff5eeab2b877da6da19013716b6a48ce09b
arm64: Add hypervisor safe helper for checking constant capabilities

The hypervisor may not have full access to the kernel data structures
and hence cannot safely use cpus_have_cap() helper for checking the
system capability. Add a safe helper for hypervisors to check a constant
system capability, which *doesn't* fall back to checking the bitmap
maintained by the kernel. With this, make the cpus_have_cap() only
check the bitmask and force constant cap checks to use the new API
for quicker checks.

Cc: Robert Ritcher <rritcher@cavium.com>
Cc: Tirumalesh Chalamarla <tchalamarla@cavium.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/process.c
drivers/irqchip/irq-gic-v3.c