Skip to content

Commit fb9b7b4

Browse files
arndbjgross1
authored andcommitted
x86: xen: add missing prototypes
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 <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 3d01342 commit fb9b7b4

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

arch/x86/xen/efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include <asm/setup.h>
1717
#include <asm/xen/hypercall.h>
1818

19+
#include "xen-ops.h"
20+
1921
static efi_char16_t vendor[100] __initdata;
2022

2123
static efi_system_table_t efi_systab_xen __initdata = {

arch/x86/xen/smp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#ifndef _XEN_SMP_H
33

44
#ifdef CONFIG_SMP
5+
6+
void asm_cpu_bringup_and_idle(void);
7+
asmlinkage void cpu_bringup_and_idle(void);
8+
59
extern void xen_send_IPI_mask(const struct cpumask *mask,
610
int vector);
711
extern void xen_send_IPI_mask_allbutself(const struct cpumask *mask,

arch/x86/xen/smp_pv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static DEFINE_PER_CPU(struct xen_common_irq, xen_irq_work) = { .irq = -1 };
5555
static DEFINE_PER_CPU(struct xen_common_irq, xen_pmu_irq) = { .irq = -1 };
5656

5757
static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id);
58-
void asm_cpu_bringup_and_idle(void);
5958

6059
static void cpu_bringup(void)
6160
{

arch/x86/xen/xen-ops.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ int xen_cpuhp_setup(int (*cpu_up_prepare_cb)(unsigned int),
146146
void xen_pin_vcpu(int cpu);
147147

148148
void xen_emergency_restart(void);
149+
void xen_force_evtchn_callback(void);
150+
149151
#ifdef CONFIG_XEN_PV
150152
void xen_pv_pre_suspend(void);
151153
void xen_pv_post_suspend(int suspend_cancelled);
154+
void xen_start_kernel(struct start_info *si);
152155
#else
153156
static inline void xen_pv_pre_suspend(void) {}
154157
static inline void xen_pv_post_suspend(int suspend_cancelled) {}

include/xen/xen.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ extern uint32_t xen_start_flags;
3131

3232
#include <xen/interface/hvm/start_info.h>
3333
extern struct hvm_start_info pvh_start_info;
34+
void xen_prepare_pvh(void);
35+
struct pt_regs;
36+
void xen_pv_evtchn_do_upcall(struct pt_regs *regs);
3437

3538
#ifdef CONFIG_XEN_DOM0
3639
#include <xen/interface/xen.h>

0 commit comments

Comments
 (0)