Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755891AbdLVA1x (ORCPT ); Thu, 21 Dec 2017 19:27:53 -0500 Received: from mga03.intel.com ([134.134.136.65]:55050 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755695AbdLVA1L (ORCPT ); Thu, 21 Dec 2017 19:27:11 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,438,1508828400"; d="scan'208";a="4811010" From: Andi Kleen To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Andi Kleen Subject: [PATCH 2/6] x86/xen: Mark pv stub assembler symbol visible Date: Thu, 21 Dec 2017 16:18:17 -0800 Message-Id: <20171222001821.2157-3-andi@firstfloor.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171222001821.2157-1-andi@firstfloor.org> References: <20171222001821.2157-1-andi@firstfloor.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1446 Lines: 40 From: Andi Kleen 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 --- 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