summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/virt.h
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-05-13 11:38:28 +0100
committerMarc Zyngier <maz@kernel.org>2020-05-16 15:04:51 +0100
commitce6f8f02f9f6786355fa6c79d88b839639dd75d8 (patch)
treea74ea5422b81a92da81719d095c4c2ea103f47b3 /arch/arm64/include/asm/virt.h
parentc6fe89ff8b250ad4dc4bed7bd5877bfbc35f4aba (diff)
KVM: arm64: Use cpus_have_final_cap for has_vhe()
By the time we start using the has_vhe() helper, we have long discovered whether we are running VHE or not. It thus makes sense to use cpus_have_final_cap() instead of cpus_have_const_cap(), which leads to a small text size reduction. Signed-off-by: Marc Zyngier <maz@kernel.org> Acked-by: David Brazdil <dbrazdil@google.com> Link: https://lore.kernel.org/r/20200513103828.74580-1-maz@kernel.org
Diffstat (limited to 'arch/arm64/include/asm/virt.h')
-rw-r--r--arch/arm64/include/asm/virt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h
index 61fd26752adc..5051b388c654 100644
--- a/arch/arm64/include/asm/virt.h
+++ b/arch/arm64/include/asm/virt.h
@@ -85,7 +85,7 @@ static inline bool is_kernel_in_hyp_mode(void)
static __always_inline bool has_vhe(void)
{
- if (cpus_have_const_cap(ARM64_HAS_VIRT_HOST_EXTN))
+ if (cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN))
return true;
return false;