Skip to content

Commit

Permalink
x86/xen: Mark xen_hvm_need_lapic() and xen_x2apic_para_available() as…
Browse files Browse the repository at this point in the history
… __init

.. as they are only called at early bootup stage. In fact, other
functions in x86_hyper_xen_hvm.init.* are all marked as __init.

Unexport xen_hvm_need_lapic as it's never used outside.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.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 814bbf4 commit 1b37683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions arch/x86/include/asm/xen/hypervisor.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ static inline uint32_t xen_cpuid_base(void)
}

#ifdef CONFIG_XEN
extern bool xen_hvm_need_lapic(void);
extern bool __init xen_hvm_need_lapic(void);

static inline bool xen_x2apic_para_available(void)
static inline bool __init xen_x2apic_para_available(void)
{
return xen_hvm_need_lapic();
}
#else
static inline bool xen_x2apic_para_available(void)
static inline bool __init xen_x2apic_para_available(void)
{
return (xen_cpuid_base() != 0);
}
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/xen/enlighten_hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static __init int xen_parse_nopv(char *arg)
}
early_param("xen_nopv", xen_parse_nopv);

bool xen_hvm_need_lapic(void)
bool __init xen_hvm_need_lapic(void)
{
if (xen_nopv)
return false;
Expand All @@ -230,7 +230,6 @@ bool xen_hvm_need_lapic(void)
return false;
return true;
}
EXPORT_SYMBOL_GPL(xen_hvm_need_lapic);

static uint32_t __init xen_platform_hvm(void)
{
Expand Down

0 comments on commit 1b37683

Please sign in to comment.