From: Andi Kleen <a...@linux.intel.com> Symbols referenced from assembler (either directly or e.f. from DEFINE_STATIC_KEY()) need to be global and visible in gcc LTO because they could end up in a different object file than the assembler. This can lead to linker errors without this patch.
So mark xen_vcpu_stolen() as __visible. Cc: Juergen Gross <jgr...@suse.com> Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com> Cc: <xen-devel@lists.xenproject.org> Signed-off-by: Andi Kleen <a...@linux.intel.com> Signed-off-by: Martin Liska <mli...@suse.cz> Signed-off-by: Jiri Slaby <jsl...@suse.cz> --- drivers/xen/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/time.c b/drivers/xen/time.c index 152dd33bb223..006a04592c8f 100644 --- a/drivers/xen/time.c +++ b/drivers/xen/time.c @@ -145,7 +145,7 @@ void xen_get_runstate_snapshot(struct vcpu_runstate_info *res) } /* return true when a vcpu could run but has no real cpu to run on */ -bool xen_vcpu_stolen(int vcpu) +__visible bool xen_vcpu_stolen(int vcpu) { return per_cpu(xen_runstate, vcpu).state == RUNSTATE_runnable; } -- 2.38.1