Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5372102rwb; Mon, 14 Nov 2022 03:49:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7lfcLME5i0pNUxJVBNLPdlVgotYuvK0W4EdId/DGx4eO56YBc+gX7utE5x8WCVNc+E8RCI X-Received: by 2002:a17:906:61b:b0:7ae:3684:84b0 with SMTP id s27-20020a170906061b00b007ae368484b0mr9696486ejb.622.1668426550645; Mon, 14 Nov 2022 03:49:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426550; cv=none; d=google.com; s=arc-20160816; b=kqeAO6NMBxBepnNBMKqo5lZlwWOOQjfv+i2M3MA026mGgI2Bl3g4a3RJWkDCoxygD7 um1aek83NaYDBM6494BLejm0zuFMpTraVGXgY8gwydcqYl7p1lj1vmxhs2cNKFPtE7K0 K354vSTMQPfHAuBSoCmgIGxTKMvDH8ekRaaBaYn6mCBukIU5P+BTcOHbjmPbjZGdpeux lipz5gNMhuWgBASqZNwxzsN6498LWKsJJ+UqQhvvrjj4CuO2fIj6b7xYbdVqZSdeX0Kd DAeQXyxoC2+U7KHF2VuIuBj7dk+sLCkztq6rGIBXEW23L43reexJCp4YVwZB/lLLMRq3 deVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z5oJZBSWwgnPbQhTtEvZJ4+nelyi+5iof19yfzgCYhc=; b=vmVheKemFilE8luAXy2L2KZCKMI5AlwA2Gu3yewqoHpz4HkJ172z0sgod1gPvbShyL RJReNO2YGkQjx45uV7o33vIUt2vJvXmYi2Kb1onew6Za8WPKi93I51qKThjjVFynMG/6 hCWufcQH6lC6FWbCIgih4whBg6HQcj6ELUBb4Yp/uZsNW4iB+z2uNIxKYywTUsjlv5uI h0ITpmuYFVLCPc4SvRsShtzFHFKoQqomXG4hUuu5JsTfZO2S3lV6WJ1O8trAgCsztTFv fCTABKWE3aRENcUEbfXqk1PPoE8YGtXXJnFBOSKasJhGypx1uPjA/XF0GFHHwKAtrjeG nIiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iMdFCUcw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jw12-20020a17090776ac00b007ad79c4f58fsi7033173ejc.120.2022.11.14.03.48.47; Mon, 14 Nov 2022 03:49:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iMdFCUcw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236658AbiKNLpI (ORCPT + 88 others); Mon, 14 Nov 2022 06:45:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236660AbiKNLoe (ORCPT ); Mon, 14 Nov 2022 06:44:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDDBA20BC5 for ; Mon, 14 Nov 2022 03:44:25 -0800 (PST) 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 905B0B80E6C for ; Mon, 14 Nov 2022 11:44:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 988CDC433C1; Mon, 14 Nov 2022 11:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426263; bh=owzR+yZF1fBmG413bQU+FKodqiSnrZRm615nsyA2Qd8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iMdFCUcwcAU0BxJEunp20sguBCmcihaBHzTN2R0laCZjfHpV3wYTLqN8Vo2RZE7iE haT1PNIPMmf++W29BCMx6YNaaDQS8iK2T4P5eJJzru7mrUTlNkwpLyOvP/sVh3ZW7g jVUQmQuZqHtZAIEj4JTTWT7Fml+LW8NRfvsbzTjt4+Ejv/GYDgIi4+nyNlni1tgPdH qhdKHJQ1coiRZPhNytWT8z/3lra+iaMThcXGG5fwaGe7WwfIYSj0GxQSZungNuRLsC 8kdFYo1ocB+NsfrwYgJw3vwGvgr9pTj/vGO7sjkMOOniPt6Bd8ZEa++WhKOr3ySQUf Q0rqE88PdqL1w== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Juergen Gross , Alexey Makhalov , VMware PV-Drivers Reviewers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , x86@kernel.org, Martin Liska , Jiri Slaby Subject: [PATCH 12/46] x86/paravirt, lto: Mark native_steal_clock() as __visible_on_lto Date: Mon, 14 Nov 2022 12:43:10 +0100 Message-Id: <20221114114344.18650-13-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 native_steal_clock() as __visible_on_lto. [js] use __visible_on_lto Cc: Juergen Gross Cc: "Srivatsa S. Bhat Cc: Alexey Makhalov Cc: VMware PV-Drivers Reviewers Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Andi Kleen Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- arch/x86/kernel/paravirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 7ca2d46c08cc..27a537cd4b0e 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -120,7 +120,7 @@ unsigned int paravirt_patch(u8 type, void *insn_buff, unsigned long addr, struct static_key paravirt_steal_enabled; struct static_key paravirt_steal_rq_enabled; -static u64 native_steal_clock(int cpu) +__visible_on_lto u64 native_steal_clock(int cpu) { return 0; } -- 2.38.1