mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Vitaly Kuznetsov](/assets/img/avatar_default.png)
Kbuild test robot reports the following problem on ARM: for 'xen_setup_callback_vector' [-Wmissing-prototypes] 1664 | void xen_setup_callback_vector(void) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~ The problem is that xen_setup_callback_vector is a x86 only thing, its definition is present in arch/x86/xen/xen-ops.h but not on ARM. In events_base.c there is a stub for !CONFIG_XEN_PVHVM but it is not declared as 'static'. On x86 the situation is hardly better: drivers/xen/events/events_base.c doesn't include 'xen-ops.h' from arch/x86/xen/, it includes its namesake from include/xen/ which also results in a 'no previous prototype' warning. Currently, xen_setup_callback_vector() has two call sites: one in drivers/xen/events_base.c and another in arch/x86/xen/suspend_hvm.c. The former is placed under #ifdef CONFIG_X86 and the later is only compiled in when CONFIG_XEN_PVHVM. Resolve the issue by moving xen_setup_callback_vector() declaration to arch neutral 'include/xen/hvm.h' as the implementation lives in arch neutral drivers/xen/events/events_base.c. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://lkml.kernel.org/r/20200520161600.361895-1-vkuznets@redhat.com
19 lines
386 B
C
19 lines
386 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/types.h>
|
|
|
|
#include <xen/xen.h>
|
|
#include <xen/hvm.h>
|
|
#include <xen/features.h>
|
|
#include <xen/interface/features.h>
|
|
|
|
#include "xen-ops.h"
|
|
|
|
void xen_hvm_post_suspend(int suspend_cancelled)
|
|
{
|
|
if (!suspend_cancelled) {
|
|
xen_hvm_init_shared_info();
|
|
xen_vcpu_restore();
|
|
}
|
|
xen_setup_callback_vector();
|
|
xen_unplug_emulated_devices();
|
|
}
|