Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1873888ybg; Thu, 30 Jul 2020 05:07:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2jkYvRfqBJaZzB6EcUGSvFsmCedGpl17g3ZFWYvI8me9eFNdWEhGsIQtwvtpd/HOVasZP X-Received: by 2002:a17:906:b08:: with SMTP id u8mr2325253ejg.401.1596110828053; Thu, 30 Jul 2020 05:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596110828; cv=none; d=google.com; s=arc-20160816; b=Goc2nQe0pGw3kat0DM64LHg3UWj9ap9Lkcl0VxAQWwAG0OExWwxaoE8mkwbsxd9evZ BBaV0oCB5Z24wnhXaq1xzl5SsgpYIBQdI41dLfBO+7anqjS4ZFYL3JdV2TEradGlzuUx UY26tHJaNbCp+31N9LnxyCeCOOwQ5bR9cv6V0fgwaXh0+QrerIhXh0KExzO74QJJJYB1 WbJ3qExNOzh/zioSqqY41zAXsOf7kl1ItGIy+n6p49cCub9RGVpLbtXHhLMIiep1D90L HKeezGIx9UCguCO5LJwlCQzD45MHgdbJ3Pvq+/MHXEGlvact2ClxpomRCTcmjkrxJEi7 GgfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=K+eUUvTbbNEZlvDdP1JCSBXeEFri9MJPF1s6uVXRl4k=; b=BGNivMyatyr76ojYzP9kccOydBFA90pl048TZlxYOQYhMC8GdnuYUzvyyrb4HgfYIC V5k6BHJv/ew0pTPczwDFcz9hPSymYfxUy5Kgz1cpK/53KRXCfvqgWdjVbNwwNDvTqN1Q HuQvcx0i1AHgwZ3Fh7+SiJy5UhUmFk7GFZZnrK1UZ/8l8wLQ9OsapRyruvJqW5SusU+Y xx0gnZ36foup7wdwgE0KyT7ESmDj5rTiFi/puk8BGPJjoYJ7u2AxtY8Pm6p3V3Qf7tx5 FzO6i29Id8dp5h4A1QI3JGDnhtfil0T8PoGm4R84smbkGVObsRqB2/cYhToSw/FE2jvT 93Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=CYke0PcA; 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 l30si3125013ede.587.2020.07.30.05.06.45; Thu, 30 Jul 2020 05:07:08 -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; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=CYke0PcA; 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 S1728057AbgG3MEd (ORCPT + 99 others); Thu, 30 Jul 2020 08:04:33 -0400 Received: from ozlabs.org ([203.11.71.1]:33087 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbgG3MEc (ORCPT ); Thu, 30 Jul 2020 08:04:32 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4BHTbx1lczz9sSd; Thu, 30 Jul 2020 22:04:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1596110670; bh=z0WIyR/mZG9ZjQNWeL5HzLGtq1gOYwd4LC1GYXLfzlQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CYke0PcAF/Ees6uRtYzVeoJVbRvmwbMwl2Sd7v10oKOJf1C9sXfUqjLwsGKxbg2iN RAP1SfNDOZUOTofug5H9MHFA1Ojd4rnvgWumBThOibNO/QahMAOO6kQOGAW/mxhFEp VlAA7sCX09gdJklvvelzUK04jG2bQFRjCx/bycCFnUf5+aCDEdKixCNSGH/BIEOS80 i1GRuRf1pRLDEG3gKREmiQAdv+U8+ARHRH4vKqbYvHm/Qd005UzrQY1Waz5tNZW6jf nPwHOJe23D3mf8eYl9UcWRlpJoj3vp3tKfaVZ/+pjYxMiMCTYamxgAdY6E9WnyA49G yZNpnalCUpdGQ== From: Michael Ellerman To: Segher Boessenkool , 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 In-Reply-To: <20200729224427.GI17447@gate.crashing.org> References: <20200729133741.62789-1-vdronov@redhat.com> <20200729144949.GF17447@gate.crashing.org> <584129967.9672326.1596051896801.JavaMail.zimbra@redhat.com> <20200729224427.GI17447@gate.crashing.org> Date: Thu, 30 Jul 2020 22:04:27 +1000 Message-ID: <87ft995hv8.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Segher Boessenkool writes: > 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 :-) I haven't seen it in my GCC 10 builds, so there must be some other subtlety. Probably it depends on details of the .config. cheers