mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 19:14:30 +08:00
fb9b7b4b2b
These function are all called from assembler files, or from inline assembler, so there is no immediate need for a prototype in a header, but if -Wmissing-prototypes is enabled, the compiler warns about them: arch/x86/xen/efi.c:130:13: error: no previous prototype for 'xen_efi_init' [-Werror=missing-prototypes] arch/x86/platform/pvh/enlighten.c:120:13: error: no previous prototype for 'xen_prepare_pvh' [-Werror=missing-prototypes] arch/x86/xen/enlighten_pv.c:1233:34: error: no previous prototype for 'xen_start_kernel' [-Werror=missing-prototypes] arch/x86/xen/irq.c:22:14: error: no previous prototype for 'xen_force_evtchn_callback' [-Werror=missing-prototypes] arch/x86/entry/common.c:302:24: error: no previous prototype for 'xen_pv_evtchn_do_upcall' [-Werror=missing-prototypes] Declare all of them in an appropriate header file to avoid the warnings. For consistency, also move the asm_cpu_bringup_and_idle() declaration out of smp_pv.c. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Link: https://lore.kernel.org/r/20230614073501.10101-3-jgross@suse.com Signed-off-by: Juergen Gross <jgross@suse.com>
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _XEN_SMP_H
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
void asm_cpu_bringup_and_idle(void);
|
|
asmlinkage void cpu_bringup_and_idle(void);
|
|
|
|
extern void xen_send_IPI_mask(const struct cpumask *mask,
|
|
int vector);
|
|
extern void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
|
|
int vector);
|
|
extern void xen_send_IPI_allbutself(int vector);
|
|
extern void xen_send_IPI_all(int vector);
|
|
extern void xen_send_IPI_self(int vector);
|
|
|
|
extern int xen_smp_intr_init(unsigned int cpu);
|
|
extern void xen_smp_intr_free(unsigned int cpu);
|
|
int xen_smp_intr_init_pv(unsigned int cpu);
|
|
void xen_smp_intr_free_pv(unsigned int cpu);
|
|
|
|
void xen_smp_cpus_done(unsigned int max_cpus);
|
|
|
|
void xen_smp_send_reschedule(int cpu);
|
|
void xen_smp_send_call_function_ipi(const struct cpumask *mask);
|
|
void xen_smp_send_call_function_single_ipi(int cpu);
|
|
|
|
void __noreturn xen_cpu_bringup_again(unsigned long stack);
|
|
|
|
struct xen_common_irq {
|
|
int irq;
|
|
char *name;
|
|
};
|
|
#else /* CONFIG_SMP */
|
|
|
|
static inline int xen_smp_intr_init(unsigned int cpu)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void xen_smp_intr_free(unsigned int cpu) {}
|
|
|
|
static inline int xen_smp_intr_init_pv(unsigned int cpu)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void xen_smp_intr_free_pv(unsigned int cpu) {}
|
|
#endif /* CONFIG_SMP */
|
|
|
|
#endif
|