public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 2/6] x86/xen: Mark pv stub assembler symbol visible
Date: Thu, 21 Dec 2017 16:18:17 -0800	[thread overview]
Message-ID: <20171222001821.2157-3-andi@firstfloor.org> (raw)
In-Reply-To: <20171222001821.2157-1-andi@firstfloor.org>

From: Andi Kleen <ak@linux.intel.com>

With LTO any external assembler symbol has to be marked __visible.
Mark the generated asm PV stubs __visible to prevent a linker error.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/include/asm/paravirt.h | 3 ++-
 drivers/xen/time.c              | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 892df375b615..f03445fbbe2f 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -745,7 +745,8 @@ static __always_inline bool pv_vcpu_is_preempted(long cpu)
  */
 #define PV_THUNK_NAME(func) "__raw_callee_save_" #func
 #define PV_CALLEE_SAVE_REGS_THUNK(func)					\
-	extern typeof(func) __raw_callee_save_##func;			\
+	extern __visible typeof(func) __raw_callee_save_##func;		\
+	extern __visible typeof(func) func;				\
 									\
 	asm(".pushsection .text;"					\
 	    ".globl " PV_THUNK_NAME(func) ";"				\
diff --git a/drivers/xen/time.c b/drivers/xen/time.c
index 3e741cd1409c..708a00c337d7 100644
--- a/drivers/xen/time.c
+++ b/drivers/xen/time.c
@@ -144,7 +144,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.15.0

  parent reply	other threads:[~2017-12-22  0:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22  0:18 x86 cleanups from the LTO tree Andi Kleen
2017-12-22  0:18 ` [PATCH 1/6] x86/timer: Don't inline __const_udelay Andi Kleen
2018-01-14 19:10   ` [tip:x86/cleanups] " tip-bot for Andi Kleen
2018-01-14 19:16     ` Joe Perches
2017-12-22  0:18 ` Andi Kleen [this message]
2018-01-14 18:14   ` [PATCH 2/6] x86/xen: Mark pv stub assembler symbol visible Thomas Gleixner
2018-01-15 17:17   ` Boris Ostrovsky
2017-12-22  0:18 ` [PATCH 3/6] locking/spinlocks: Mark spinlocks noinline when inline spinlocks are disabled Andi Kleen
2018-01-14 18:13   ` Thomas Gleixner
2017-12-22  0:18 ` [PATCH 4/6] x86/kvm: Make steal_time visible Andi Kleen
2018-01-14 18:14   ` Thomas Gleixner
2017-12-22  0:18 ` [PATCH 5/6] x86: Make exception handler functions visible Andi Kleen
2018-01-14 19:10   ` [tip:x86/cleanups] x86/extable: Mark " tip-bot for Andi Kleen
2017-12-22  0:18 ` [PATCH 6/6] x86/idt: Make const __initconst Andi Kleen
2018-01-14 19:12   ` [tip:x86/urgent] x86/idt: Mark IDT tables __initconst tip-bot for Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171222001821.2157-3-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox