KVM: arm64: Fix compilation when CONFIG_ARM64_USE_LSE_ATOMICS=n
Oliver Upton
maintainerPATCH 1/1 KVM: arm64: Fix compilation when CONFIG_ARM64_USE_LSE_ATOMICS=n
__lse_swap_desc() is compiled unconditionally, even if LSE is disabled using the config option. Align with the spirit of the config option and fix some build errors due to __LSE_PREAMBLE being undefined with the application of some ifdeffery.
Reported-by kernel test robot <[email protected]>
Signed-off-by Oliver Upton <[email protected]>
--- arch/arm64/kvm/at.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm64/kvm/at.c +7 -0
@@ -1697,6 +1697,7 @@ int __kvm_find_s1_desc_level(struct kvm_vcpu *vcpu, u64 va, u64 ipa, int *level) } } +#ifdef CONFIG_ARM64_LSE_ATOMICS static int __lse_swap_desc (u64 __user *ptep,u64 old,u64 new) {u64 tmp = old;
@@ -1721,6 +1722,12 @@ static int __lse_swap_desc(u64 __user *ptep, u64 old, u64 new) return ret; } +#else +static int __lse_swap_desc (u64 __user *ptep,u64 old,u64 new) +{ +return -EINVAL ; +} +#endif static int __llsc_swap_desc (u64 __user *ptep,u64 old,u64 new) {
Signature · 1 line
2.47.3
Quoted 6 lines · Oliver Upton
__lse_swap_desc()is compiled unconditionally, even if LSE is disabled using the config option. Align with the spirit of the config option and fix some build errors due to__LSE_PREAMBLEbeing undefined with the application of some ifdeffery.
Applied to next, thanks!
[1/1] KVM: arm64: Fix compilation when CONFIG_ARM64_USE_LSE_ATOMICS=n
https://git.kernel.org/kvmarm/kvmarm/c/3350cbbc8f7d
--
Best,
Oliver