From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A684C4332F for ; Mon, 14 Nov 2022 17:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237271AbiKNRnm (ORCPT ); Mon, 14 Nov 2022 12:43:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237267AbiKNRnh (ORCPT ); Mon, 14 Nov 2022 12:43:37 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F01B7EC for ; Mon, 14 Nov 2022 09:43:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rgYtpYSDeeeAyOKKIz8SA+g2LVtMu4xota226sIvZsU=; b=ijb0Ic36z7dMPDwWHquBnaLGbl aWpKRINVkx/ryCemdjmDOWN8qoS6NKy8DRB/juJHjCw7cjpD7aiFbThLvOfJ7XU65URCoeg+HUSO+ 7uI3gEfWNJJy6J0mGSMl5O0T6nDzq/x/wVmojH4CbfKoPFLWw7T0YnSRZjpcmgD1M3UbTi2pNI+TP iVXo4LD4n4tH6v80Aj9tYoJ0TNbRSRRYBk2t56eZsJMJ/XmFKZyxnH2hUlTgixLXa6FxK0XrZjKuF kRQUDPTHCCZilnkn6bINMxaivt3NiLzSXFfVcmWgawAT6fonsS/0lZNjL85LGrOCQXQUJfaSr2sbd iviHvjhQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oudUa-00FcB5-0Q; Mon, 14 Nov 2022 17:43:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 48674300137; Mon, 14 Nov 2022 16:58:27 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2D1372C0E2A8E; Mon, 14 Nov 2022 16:58:27 +0100 (CET) Date: Mon, 14 Nov 2022 16:58:27 +0100 From: Peter Zijlstra To: "Jiri Slaby (SUSE)" Cc: linux-kernel@vger.kernel.org, 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: Re: [PATCH 12/46] x86/paravirt, lto: Mark native_steal_clock() as __visible_on_lto Message-ID: References: <20221114114344.18650-1-jirislaby@kernel.org> <20221114114344.18650-13-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221114114344.18650-13-jirislaby@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 12:43:10PM +0100, Jiri Slaby (SUSE) wrote: > 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. > @@ -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) More hate; same reason, DEFINE_STATIC_CALL() takes the function address and stuffs it in a variable, WTF is GCC-LTO eliminating it?