Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1311114rwb; Wed, 16 Nov 2022 15:40:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf6U7d/yoBQx/1r0ZDdsCJfnmnQZCElY4TnFD3GfPtpt3a4sUFRp1RtojmIuQSo8v1g09S2W X-Received: by 2002:aa7:c9c3:0:b0:461:8f21:5f12 with SMTP id i3-20020aa7c9c3000000b004618f215f12mr46066edt.54.1668642038994; Wed, 16 Nov 2022 15:40:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668642038; cv=none; d=google.com; s=arc-20160816; b=cqHGNnBvtMpEwtzGEd/lMMW/kq5xyz7WjvhVrtOKOgowKSr4z5+0afxp9jexEgTv3S uS9gd8Mm1z/uTIC5OHOCJdhiYUcPdZtGz4u+uUXw92liShIjeOsdzv/hHdYuJzxYHe8B 4/GAYMKKuTC0iTbPqXvTiHWTlQLvxYB1k1rlrggYzInEXjgrszUdhKNrccc8LhtgfjOB 8bvsMGCxoeWMBhzASHYyKhPIKQdk4K/k7STjlTAV3QQrn0BNyDv9piWfb/jeNImozQLA tQuHpuV9admshWwOz9pNrQiVKp8OFqYP1cexx6tpBK0wzIsNGdSKvZgdLKDunL+yGipP PM0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=pDaFkdlN2tr+Rr4sOx7rnuAZtKYB2+xwBw4RZnHYHdQ=; b=m2RYaAC1oTwkKL9zAqOwsRwQzfFjuqVMpSnECcNm399N6s/q2j0/d8B0EXu6AsYF34 Br7dPQPkgoQPpUUxx4cQ2FGMbc0XVZX3K7aep9TgqymlQoxHrE+UMLfSPppDt6D+oZSz H+I/xhMy2VuvrgrJOt1zOyRp8XL59luYTgNL7+hU6oEXh8ZyEyoJsXugWSIqhavHiEAS SbdTxvrvF767+Tgeb1nHuVuQN1z5CpMoEBLhp9mPalzdLgtVqGlDU52BomjCwSNaAA05 8OEJQ+qHJBL2kTPCV1aBcnXSy/asd/GwpU1GLB4+ephh49ls7+QWgtebJQO6mymWgdNn 7uzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=I4fneGuU; dkim=neutral (no key) header.i=@linutronix.de header.b=c3IgSOcH; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb21-20020a1709077e9500b007ae17fd2f2dsi16499171ejc.996.2022.11.16.15.40.17; Wed, 16 Nov 2022 15:40:38 -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=@linutronix.de header.s=2020 header.b=I4fneGuU; dkim=neutral (no key) header.i=@linutronix.de header.b=c3IgSOcH; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233973AbiKPXam (ORCPT + 90 others); Wed, 16 Nov 2022 18:30:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233921AbiKPXak (ORCPT ); Wed, 16 Nov 2022 18:30:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A9CC68697 for ; Wed, 16 Nov 2022 15:30:39 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668641435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pDaFkdlN2tr+Rr4sOx7rnuAZtKYB2+xwBw4RZnHYHdQ=; b=I4fneGuUDEiOoNVAyslD23Xl5KFKYbb2dwcSjLXWVQcL3F5/xbpOcLmddw7okzRQjYJG62 f45C2kSAp5SFnbWpxA/QlJ7dC37DuR2WeMBAbUMA9U49WSjWaf1YAFCLJkzVJvBEuPiWmf DoF450ItHYdX/GlDHRmCHbaX8T+gTTaTu2OqnKp9PVprQmD45qA8v6pBSA8BjNtrSfcb6O SJacOWFHFC8r+8EWGqQ/MMJc4TgAnbJP0sxQLXgZ1Nj0kuda6hsnueewtVo4IAhQ6Rkyfz CVKX6UQ9Fjd6Y0paR+QkZoAyGH/HjDxAWfAmNBPYqUXu+kbeBgUC3flJtZavyw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668641435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pDaFkdlN2tr+Rr4sOx7rnuAZtKYB2+xwBw4RZnHYHdQ=; b=c3IgSOcHcXFRwxAaRQ0jxKXBTdV5ZEtxUZumEw6sDBekzeyE0eKLJ5e6Zjh6VUxwSL/XiF yA8TYxsADWTFtPAg== To: "Jiri Slaby (SUSE)" , linux-kernel@vger.kernel.org Cc: Andi Kleen , Peter Zijlstra , Andy Lutomirski , Martin Liska , Jiri Slaby Subject: Re: [PATCH 18/46] entry, lto: Mark raw_irqentry_exit_cond_resched() as __visible In-Reply-To: <20221114114344.18650-19-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> <20221114114344.18650-19-jirislaby@kernel.org> Date: Thu, 17 Nov 2022 00:30:34 +0100 Message-ID: <87a64qo4th.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 On Mon, Nov 14 2022 at 12:43, Jiri Slaby wrote: > Symbols referenced from assembler (either directly or e.f. from from assembler? I'm not aware that the assembler references anything. Also what does e.f. mean? Did you want to write e.g.? > 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 than the assembler? Are we shipping the assembler in an object file? > can lead to linker errors without this patch. git grep -i 'this patch' Documentation/process/ > So mark raw_irqentry_exit_cond_resched() as __visible. And all that tells me what? I know what you want to say, but it's not there. Symbols in different compilation units which are referenced from assembly code either directly or indirectly, e.g. from DEFINE_STATIC_KEY(), must be marked visible for GCC based LTO builds. Add the missing __visible annotation to raw_irqentry_exit_cond_resched(). See? There is no 'global' because it's obvious that a symbol in a different compilation unit must be global to be resolvable. It's also obvious that code in different compilation units ends up in different object files. So stating that it's a 'must' to have such symbols marked visible is good enough for an argument because that tells the reader that this is a mandatory requirement for an GCC based LTO build. No? Thanks, tglx