2023-05-31 10:18:59

by Dmitry Antipov

[permalink] [raw]
Subject: [PATCH] x86: add prototypes to fix 'make LLVM=1 W=1' build

Add prototypes required to fix the following 'make LLVM=1 W=1'
build errors:

arch/x86/entry/common.c:238:24: error: no previous prototype for
function 'do_SYSENTER_32' [-Werror,-Wmissing-prototypes]
__visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
^

arch/x86/entry/common.c:302:24: error: no previous prototype for
function 'xen_pv_evtchn_do_upcall' [-Werror,-Wmissing-prototypes]
__visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs)
^

Signed-off-by: Dmitriy Antipov <[email protected]>
---
arch/x86/include/asm/syscall.h | 4 ++++
arch/x86/include/asm/xen/events.h | 2 ++
2 files changed, 6 insertions(+)

diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h
index 5b85987a5e97..b7929c27dc4f 100644
--- a/arch/x86/include/asm/syscall.h
+++ b/arch/x86/include/asm/syscall.h
@@ -132,4 +132,8 @@ long do_fast_syscall_32(struct pt_regs *regs);

#endif /* CONFIG_X86_32 */

+#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
+extern __visible noinstr long do_SYSENTER_32(struct pt_regs *regs);
+#endif
+
#endif /* _ASM_X86_SYSCALL_H */
diff --git a/arch/x86/include/asm/xen/events.h b/arch/x86/include/asm/xen/events.h
index 62bdceb594f1..8177aa839e7c 100644
--- a/arch/x86/include/asm/xen/events.h
+++ b/arch/x86/include/asm/xen/events.h
@@ -34,5 +34,7 @@ static inline bool xen_support_evtchn_rebind(void)
return (!xen_hvm_domain() || xen_have_vector_callback);
}

+extern __visible noinstr void xen_pv_evtchn_do_upcall(struct pt_regs *regs);
+
extern bool xen_percpu_upcall;
#endif /* _ASM_X86_XEN_EVENTS_H */
--
2.40.1