Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1483005ybg; Wed, 29 Jul 2020 15:45:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj6mPbRPAA3fwdzM6//JTxnxYUEdqps+gGlWF45D8AlXfwklJVLJiDThMJN3rqolYgkDye X-Received: by 2002:a17:907:72c6:: with SMTP id du6mr519985ejc.362.1596062742932; Wed, 29 Jul 2020 15:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596062742; cv=none; d=google.com; s=arc-20160816; b=a8uDw0tNjoTGbvJdaOJPtDV4DpZmto3o7n2+SjZnE+kYAVGQ262cftuLWutNCw/yNX echyws3vy6lPOTkyf0OLv4ETd5XJl4fEsloc0aQQw5EEBfvdVuvp6qh3/0aZIaPkJ4ek 3moAMgI8BuK3sIxfE2BOHO+5gwBpCvi0CPbhugGIqIcz5+b5jEBaTjGIxB2R0G9q5HTk lORGTb1D43MgIPhgo1/Dva/De3nNxjaXICeabuetEDpVwZglVFEZal/gtuGGQiXAABDC gY3JkRq1fTP5tioOX5PdUclN0NsR6lcMwZ9xQreYzEdHmDEkYN4C59w6IqB4aZFDq249 e06g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TGURAVCO6Z4MmRtH/pbRRFsTm70oV6EPn2cLIc9vbWM=; b=ZSY4mbjYzPZwk+N/iztkHtgvwuWYP9lCzFK2Xrxhmd6baVf4YRRgiIfPJLzd57KRnG DTlbj8wiIPq8EUxVS8QTvN1kxmshbOsom1qhAMMQuZR0157fHX983oMCYdQhWkdIdN/G mvHJgFWJdcEJNNSRNOCTvIs1eeKj7WuoPbEbR8LE9Tts5lBpMPGObWNsT94V/4qCq4vB xrxv501VPMi7ARQTyKQFF0KzMEByeRWhVpvENeeW5ytaVBYH2sB5mqBzssuCdrr12O2J GVIWS88smdNoxZiQ2JVoRN6X8HQ3sEveaAu4jqnohc6p6CB55oYfdvLlGzeYSSjOTuIS Jsjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si1498975ejd.356.2020.07.29.15.45.06; Wed, 29 Jul 2020 15:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727087AbgG2Wor (ORCPT + 99 others); Wed, 29 Jul 2020 18:44:47 -0400 Received: from gate.crashing.org ([63.228.1.57]:36577 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbgG2Wor (ORCPT ); Wed, 29 Jul 2020 18:44:47 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 06TMiTG1009810; Wed, 29 Jul 2020 17:44:29 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 06TMiS25009808; Wed, 29 Jul 2020 17:44:28 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 29 Jul 2020 17:44:27 -0500 From: Segher Boessenkool To: Vladis Dronov Cc: linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K . V" , linux-kernel@vger.kernel.org, Paul Mackerras Subject: Re: [PATCH] powerpc: fix function annotations to avoid section mismatch warnings with gcc-10 Message-ID: <20200729224427.GI17447@gate.crashing.org> References: <20200729133741.62789-1-vdronov@redhat.com> <20200729144949.GF17447@gate.crashing.org> <584129967.9672326.1596051896801.JavaMail.zimbra@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <584129967.9672326.1596051896801.JavaMail.zimbra@redhat.com> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 29, 2020 at 03:44:56PM -0400, Vladis Dronov wrote: > > > Certain warnings are emitted for powerpc code when building with a gcc-10 > > > toolset: > > > > > > WARNING: modpost: vmlinux.o(.text.unlikely+0x377c): Section mismatch in > > > reference from the function remove_pmd_table() to the function > > > .meminit.text:split_kernel_mapping() > > > The function remove_pmd_table() references > > > the function __meminit split_kernel_mapping(). > > > This is often because remove_pmd_table lacks a __meminit > > > annotation or the annotation of split_kernel_mapping is wrong. > > > > > > Add the appropriate __init and __meminit annotations to make modpost not > > > complain. In all the cases there are just a single callsite from another > > > __init or __meminit function: > > > > > > __meminit remove_pagetable() -> remove_pud_table() -> remove_pmd_table() > > > __init prom_init() -> setup_secure_guest() > > > __init xive_spapr_init() -> xive_spapr_disabled() > > > > So what changed? These functions were inlined with older compilers, but > > not anymore? > > Yes, exactly. Gcc-10 does not inline them anymore. If this is because of my > build system, this can happen to others also. > > The same thing was fixed by Linus in e99332e7b4cd ("gcc-10: mark more functions > __init to avoid section mismatch warnings"). It sounds like this is part of "-finline-functions was retuned" on ? So everyone should see it (no matter what config or build system), and it is a good thing too :-) Thanks for the confirmation, Segher