From patchwork Mon Nov 14 11:43:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 13042177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E953C4332F for ; Mon, 14 Nov 2022 11:44:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.443323.697864 (Exim 4.92) (envelope-from ) id 1ouXtC-0006mG-ER; Mon, 14 Nov 2022 11:44:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 443323.697864; Mon, 14 Nov 2022 11:44:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ouXtC-0006m9-9l; Mon, 14 Nov 2022 11:44:34 +0000 Received: by outflank-mailman (input) for mailman id 443323; Mon, 14 Nov 2022 11:44:33 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ouXtB-0006m3-15 for xen-devel@lists.xenproject.org; Mon, 14 Nov 2022 11:44:33 +0000 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b40ad893-6411-11ed-8fd2-01056ac49cbb; Mon, 14 Nov 2022 12:44:31 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E97ACB80E78; Mon, 14 Nov 2022 11:44:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB5DEC43145; Mon, 14 Nov 2022 11:44:28 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b40ad893-6411-11ed-8fd2-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426270; bh=wui7Joclil/1Zhbm3X8SG6joq+UGvmdb9Y11/m4UBYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oDcoRSsaEpF5qFmILR9P2mJ5a8lkQVqMz+gUsBuNicjhyBffTPM5tdA/mPGhAiGic b5Wgy7NrKtO74lPiJPFz39XuitjuukIBpJcWmqcaBGCVEmSV9ucqUPWl6gUdl9BQXX a+Ju58arWUNE9xg75AuU4gCyovLx/ItgDUgsr1wBwfbwhZkJPO/4/TJI+qMf2UmfoR QlFdhFWt8ofWnNOWLzvO8u0t1IFU0YF853oowuhb98g1SDgmNnnzJ48rj2v1CL7+R8 AWDAd2XOz2ooKCMSPSbZwiKQ8kngNUK18qlmx+FMIcPKRaS9JrURlWmTDeKaFml2Z4 5lHZGRLILvEUA== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, Martin Liska , Jiri Slaby Subject: [PATCH 15/46] x86/xen, lto: Mark xen_vcpu_stolen() as __visible Date: Mon, 14 Nov 2022 12:43:13 +0100 Message-Id: <20221114114344.18650-16-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> MIME-Version: 1.0 From: Andi Kleen 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 Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: Signed-off-by: Andi Kleen Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- 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; }