]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Factor out is_{vhe,nvhe}_hyp_code()
authorMark Rutland <mark.rutland@arm.com>
Mon, 26 Oct 2020 13:49:29 +0000 (13:49 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 30 Oct 2020 08:52:51 +0000 (08:52 +0000)
commit055a8ee648138ebfcee3fbffe44f24a4aee3e056
tree15b1e3213bad6e4fcf24fa2a64b130f182ad8a67
parent7e62b58f298a3641b8ab55966b1ecad375f6d8ea
KVM: arm64: Factor out is_{vhe,nvhe}_hyp_code()

Currently has_vhe() detects whether it is being compiled for VHE/NVHE
hyp code based on preprocessor definitions, and uses this knowledge to
avoid redundant runtime checks.

There are other cases where we'd like to use this knowledge, so let's
factor the preprocessor checks out into separate helpers.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: David Brazdil <dbrazdil@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201026134931.28246-2-mark.rutland@arm.com
arch/arm64/include/asm/virt.h