From patchwork Mon Nov 27 21:34:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 10078247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6D5FB602BD for ; Mon, 27 Nov 2017 21:40:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D13629081 for ; Mon, 27 Nov 2017 21:40:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51F132908F; Mon, 27 Nov 2017 21:40:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5A2B29081 for ; Mon, 27 Nov 2017 21:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752798AbdK0Vkg (ORCPT ); Mon, 27 Nov 2017 16:40:36 -0500 Received: from mga01.intel.com ([192.55.52.88]:34272 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751977AbdK0Vea (ORCPT ); Mon, 27 Nov 2017 16:34:30 -0500 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2017 13:34:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,465,1505804400"; d="scan'208";a="180836937" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.35]) by fmsmga005.fm.intel.com with ESMTP; 27 Nov 2017 13:34:30 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 7401F300338; Mon, 27 Nov 2017 13:34:29 -0800 (PST) From: Andi Kleen To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, samitolvanen@google.com, alxmtvv@gmail.com, linux-kbuild@vger.kernel.org, yamada.masahiro@socionext.com, akpm@linux-foundation.org, Andi Kleen Subject: [PATCH 01/21] x86/xen: Mark pv stub assembler symbol visible Date: Mon, 27 Nov 2017 13:34:03 -0800 Message-Id: <20171127213423.27218-2-andi@firstfloor.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171127213423.27218-1-andi@firstfloor.org> References: <20171127213423.27218-1-andi@firstfloor.org> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 283efcaac8af..cf2861aa4df0 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; }