Skip to content

Commit

Permalink
x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
Browse files Browse the repository at this point in the history
.. as "nopv" support needs it to be changeable at boot up stage.

Checkpatch reports warning, so move variable declarations from
hypervisor.c to hypervisor.h

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Juergen Gross <jgross@suse.com>
  • Loading branch information
Zhenzhong Duan authored and Juergen Gross committed Jul 17, 2019
1 parent b39b049 commit cc8f3b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 8 additions & 0 deletions arch/x86/include/asm/hypervisor.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ struct hypervisor_x86 {
bool ignore_nopv;
};

extern const struct hypervisor_x86 x86_hyper_vmware;
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
extern const struct hypervisor_x86 x86_hyper_xen_pv;
extern const struct hypervisor_x86 x86_hyper_kvm;
extern const struct hypervisor_x86 x86_hyper_jailhouse;
extern const struct hypervisor_x86 x86_hyper_acrn;
extern struct hypervisor_x86 x86_hyper_xen_hvm;

extern bool nopv;
extern enum x86_hypervisor_type x86_hyper_type;
extern void init_hypervisor_platform(void);
Expand Down
8 changes: 0 additions & 8 deletions arch/x86/kernel/cpu/hypervisor.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
#include <asm/processor.h>
#include <asm/hypervisor.h>

extern const struct hypervisor_x86 x86_hyper_vmware;
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
extern const struct hypervisor_x86 x86_hyper_xen_pv;
extern const struct hypervisor_x86 x86_hyper_xen_hvm;
extern const struct hypervisor_x86 x86_hyper_kvm;
extern const struct hypervisor_x86 x86_hyper_jailhouse;
extern const struct hypervisor_x86 x86_hyper_acrn;

static const __initconst struct hypervisor_x86 * const hypervisors[] =
{
#ifdef CONFIG_XEN_PV
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/xen/enlighten_hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
#endif
}

const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
.name = "Xen HVM",
.detect = xen_platform_hvm,
.type = X86_HYPER_XEN_HVM,
Expand Down

0 comments on commit cc8f3b4

Please sign in to comment.