Re: [PATCH 3/5] [RESEND] x86: qspinlock-paravirt: fix mising-prototype warnings
From: Borislav Petkov
Date: Tue Aug 01 2023 - 15:22:39 EST
On Tue, Jul 25, 2023 at 03:48:35PM +0200, Arnd Bergmann wrote:
> diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
> index 89842bb7ec9cc..64a6bba70d183 100644
> --- a/arch/x86/kernel/paravirt.c
> +++ b/arch/x86/kernel/paravirt.c
> @@ -73,11 +73,13 @@ DEFINE_PARAVIRT_ASM(pv_native_read_cr2, "mov %cr2, %rax", .noinstr.text);
>
> DEFINE_STATIC_KEY_TRUE(virt_spin_lock_key);
>
> +#ifdef CONFIG_SMP
> void __init native_pv_lock_init(void)
> {
> if (!boot_cpu_has(X86_FEATURE_HYPERVISOR))
> static_branch_disable(&virt_spin_lock_key);
> }
> +#endif
Can you add an empty UP stub instead?
We all have a great aversion against ifdeffery...
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette