x86/xen: define startup_xen for XEN PV only
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 14 Mar 2017 17:35:51 +0000 (18:35 +0100)
committerJuergen Gross <jgross@suse.com>
Tue, 2 May 2017 09:09:37 +0000 (11:09 +0200)
startup_xen references PV-only code, decorate it with #ifdef CONFIG_XEN_PV
to make PV-free builds possible.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/xen-head.S

index 37794e42b67dcfc3e5afb25d53cfa0afb2fcbf77..72a8e6adebe6c09da07303bafac194236f2df7c6 100644 (file)
@@ -16,6 +16,7 @@
 #include <xen/interface/xen-mca.h>
 #include <asm/xen/interface.h>
 
 #include <xen/interface/xen-mca.h>
 #include <asm/xen/interface.h>
 
+#ifdef CONFIG_XEN_PV
        __INIT
 ENTRY(startup_xen)
        cld
        __INIT
 ENTRY(startup_xen)
        cld
@@ -34,6 +35,7 @@ ENTRY(startup_xen)
        jmp xen_start_kernel
 
        __FINIT
        jmp xen_start_kernel
 
        __FINIT
+#endif
 
 .pushsection .text
        .balign PAGE_SIZE
 
 .pushsection .text
        .balign PAGE_SIZE
@@ -58,7 +60,9 @@ ENTRY(hypercall_page)
        /* Map the p2m table to a 512GB-aligned user address. */
        ELFNOTE(Xen, XEN_ELFNOTE_INIT_P2M,       .quad PGDIR_SIZE)
 #endif
        /* Map the p2m table to a 512GB-aligned user address. */
        ELFNOTE(Xen, XEN_ELFNOTE_INIT_P2M,       .quad PGDIR_SIZE)
 #endif
+#ifdef CONFIG_XEN_PV
        ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          _ASM_PTR startup_xen)
        ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          _ASM_PTR startup_xen)
+#endif
        ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,
                .ascii "!writable_page_tables|pae_pgdir_above_4gb")
        ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,
                .ascii "!writable_page_tables|pae_pgdir_above_4gb")