Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5518931rwb; Mon, 14 Nov 2022 05:59:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+L1ISlS8aVRdY3zAzgdZIu57wfobshE02XdIEPZ0Rw3J7qTb1Zh7XLC+p76d1MiIvXyz2 X-Received: by 2002:a17:906:c298:b0:78d:4ebb:7ea1 with SMTP id r24-20020a170906c29800b0078d4ebb7ea1mr9902625ejz.357.1668434369865; Mon, 14 Nov 2022 05:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668434369; cv=none; d=google.com; s=arc-20160816; b=lHxmA9QUjkMRdZHpcZFKBxnfmN2YRRB/afeIyaLFP/9MTr2HwEoBgnnmWiNvVukOAS aGeHnPZDOWuTX+mvGXDn/4HDsmXbjQYX7CNWsAfQeMXSBfU46AXDke0ASEvv5/gUTBB4 GJXDiCkhT+nQkqcz8NYw94F2DpBOYM+mUyvpYhaZ16Py/RcWOlGC6g5taxV1Vnvq4DHk A5FzJjmoNZJf1D2kECzljjuL9fkaj1iLCvC5ka9soQkDWl5qkoLi4+T26zkb7mfE5nW0 ySfahGeZI5LUt1jWAZn8OEkwbfEzY8Bc75Ye3rSLvgp9TmI5UiArHFpXTLWpxsFNG7My C8eA== 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=k3ZUR2h+mEKL3OZPzUexk63/NgLNzDz87sk4U1h1dpk=; b=RPHz9FR6+vnMZclLzZN78jUvqQLPXhUPX2Re2IfgkQR3Er/GSg0itHgU6pev3F2tQc EcyCpdYbmeEreM8+dbS7ND4VtdQty/itoCFFw1Wlqhw0uctFQFHW0950P0q5xPhmQNFE ru9+gPTx+snZvfBKbZ7xhJEh91y+7j4Nle04yp2nwzTfolRbH2tcm2qVJ6w0DNoSW7sF MfWPDHhngHC60z9Q8/hiEAvBtChvAzgmZuKX0RVDo0HI0Zr8jw6qrNznpGNTz4/NpCmP l4gS4FQXjRLQfDGv6MsndUy6k1C+g1zV5PvXgqiv7Af15aKxAx8pISy8ta4ZXdwor1wt HhDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FPYVlpz3; 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 m15-20020a056402430f00b0046777d0ad16si7604575edc.394.2022.11.14.05.59.08; Mon, 14 Nov 2022 05:59:29 -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=FPYVlpz3; 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 S236664AbiKNLpO (ORCPT + 88 others); Mon, 14 Nov 2022 06:45:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236517AbiKNLoj (ORCPT ); Mon, 14 Nov 2022 06:44:39 -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 B053B1D655 for ; Mon, 14 Nov 2022 03:44:28 -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 34A71B80E6C for ; Mon, 14 Nov 2022 11:44:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE33AC433D6; Mon, 14 Nov 2022 11:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426265; bh=mZy59RfMp+d1UJJbf+o4C0WWNhptP9zLv0Zp8nxmYqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FPYVlpz368y2BvR4VAyLp0saq8tF6P5Cp+4m0jbJhjQgB9H7x7DfN3vURZR+wYkC/ GBWAYSbKB6NYboPLqd1Rnnwtv6/IoJ4+ARtKrns+0fztif2QW7WsCr5Iw1NFJjmKup y8grnvSS2m/5cppYeNVgrNJETBDHGJSdNjFhE4s0j/dLKVfjdkkTgo7Tqi+pEQfsyf 5In4dDX+Pf1RaDEjZMXsT5w/J3HQBXMZfEWDzorQ8r2uDq8J84W6ev0qhlT9a3whu+ nW1oGTYQdFMtRHOhzEVCWZbJtpOLOTved+3Xr9wXJXB0xL7BBCqPCGFkmylbq6s2f/ D6ZFfLFn8tJyw== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , x86@kernel.org, Martin Liska , Jiri Slaby Subject: [PATCH 13/46] x86/preempt, lto: Mark preempt_schedule_*thunk() as __visible Date: Mon, 14 Nov 2022 12:43:11 +0100 Message-Id: <20221114114344.18650-14-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 preempt_schedule_thunk() and preempt_schedule_notrace_thunk() as __visible. 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/include/asm/preempt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 5f6daea1ee24..c76ec881b23c 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -106,13 +106,13 @@ static __always_inline bool should_resched(int preempt_offset) #ifdef CONFIG_PREEMPTION extern asmlinkage void preempt_schedule(void); -extern asmlinkage void preempt_schedule_thunk(void); +extern __visible asmlinkage void preempt_schedule_thunk(void); #define preempt_schedule_dynamic_enabled preempt_schedule_thunk #define preempt_schedule_dynamic_disabled NULL extern asmlinkage void preempt_schedule_notrace(void); -extern asmlinkage void preempt_schedule_notrace_thunk(void); +extern __visible asmlinkage void preempt_schedule_notrace_thunk(void); #define preempt_schedule_notrace_dynamic_enabled preempt_schedule_notrace_thunk #define preempt_schedule_notrace_dynamic_disabled NULL -- 2.38.1