Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3344252pxj; Tue, 11 May 2021 02:15:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQBxRWPpJU+SSgF01OeqH1a4i1koIK97I/tA4RcCO0Ycy0e5UIkE+HX3DuBwlrVXPUEzJE X-Received: by 2002:aa7:da95:: with SMTP id q21mr34436835eds.255.1620724537714; Tue, 11 May 2021 02:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620724537; cv=none; d=google.com; s=arc-20160816; b=cZmQkl2lYrp4RepOxMilAV4/cFAQMTrqsU/Ti/FnpO6RuFIwBOKkufp8hzwu7OBD/p rrV2zv4vMaIHTNIwnSXFmER56fAaKOIcVM4V1Fkn/c945j00tdJtZmWnHe/y9RQbp0KW 6KGp6VmksMmrxSSAe1dVbqL3NYjrYddtF9X1MUmftTSF+iE7rJ1Rg6GB6vn9wo0biSRA L5EeWbpRCRfHXnCAxfr+NUzXz9aJxp41Z6G12ksmNyCzhqswiIBgmeJy1vv2T5aUNUol teKI4T3YSXD2QN8U+i9MXjLzID+Bbgm5L0bkvFL1N14OE4/1QdxuKz4k2KpqVkYVV/aV LQog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8u0MKPiYGq4Siy0bRVbRt6GLEL1/suPHbS9O13WwlyQ=; b=K89sp3R3FaCWSzKFO33mAZNxQg4fwPD+FMg9z4rrq53TLBuceu9bkKOf+1u4QKkqSv Bhb9444zMDAY/hUKKNDeUr0kJeAu+IwHKVJ9j7/Trvbr2We2fPOoE2+FT280/kOxQFqD ppl/xXy1jtAFB8QSq+UCzONeGanmD6wOiBKulZBqO/903FoM6Lks71heTBrmrTFfBuIx Y+6agDFU7xcoC1gqI/9luLzHdeyUc4W+JjNmlN6rtGyBYak9c2TAEiTQuOuRA3AuPK3y zQ2kV+kXeyuKPlr6tLKmwWaJ3wmVz6T2gKiUyKY0Kf4Y1FnNsqZ26cpHkhL2b94qFdwB vQfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cVEP6IKt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si10492613edv.439.2021.05.11.02.15.14; Tue, 11 May 2021 02:15:37 -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=@kernel.org header.s=k20201202 header.b=cVEP6IKt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231255AbhEKJOt (ORCPT + 99 others); Tue, 11 May 2021 05:14:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:36732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhEKJOs (ORCPT ); Tue, 11 May 2021 05:14:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCB3A61927 for ; Tue, 11 May 2021 09:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620724421; bh=BR81VXadwSN0Wb8eCKd0AEu/wCwHkOKE2OFkPtdge9I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cVEP6IKtG+wR7W4R/gvZnVy/MTprx9+SnnZsvKnvbHIkQbFP7u87QPfWYPsQUNuhG PSuKxOBVC4a213TyvE/Ofw8TqmmYGnA/mcLmB8gm+c8H0X1JNbuwhEkvcjPO9Jv5H3 6XXEQRd6lDHMpZYoKzhE8g8GmMx1lfIQQZAzyc6k7jbVJFNTxq2AFvSXtnTbPvqWWu t3Gf9g4o8R9AiqpTO6MHwQyhzBFbt6eIxB7rZ/3G+mXdlRFYRV+yLjbu4m+mKOkkIS 5slYSQXFMoallYRE24BsFU1pge8ldW6sL+QrAi/H3z6HLCw1e5w6aWaeR2Mxp/Md02 ElBMCPkzn2vUA== Received: by mail-oi1-f182.google.com with SMTP id w16so10255339oiv.3 for ; Tue, 11 May 2021 02:13:41 -0700 (PDT) X-Gm-Message-State: AOAM533Z/N+vX8MTHuwDVXRaxGV9x8jkcOWu9Ylc7NHGQ2ATSLFKvkbv mPtLhLU1crOQw7k9yMo/teH7iGpqnHhOLCdcLmg= X-Received: by 2002:aca:4056:: with SMTP id n83mr2784337oia.47.1620724421115; Tue, 11 May 2021 02:13:41 -0700 (PDT) MIME-Version: 1.0 References: <20210511090318.478586-1-arnd@kernel.org> In-Reply-To: <20210511090318.478586-1-arnd@kernel.org> From: Ard Biesheuvel Date: Tue, 11 May 2021 11:13:30 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: mark prepare_page_table as __init To: Arnd Bergmann Cc: Russell King , Arnd Bergmann , Mike Rapoport , Linus Walleij , Andrew Morton , Hailong Liu , Changbin Du , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 May 2021 at 11:04, Arnd Bergmann wrote: > > From: Arnd Bergmann > > In some configurations when building with gcc-11, prepare_page_table > does not get inline, which causes a build time warning for a section > mismatch: > > WARNING: modpost: vmlinux.o(.text.unlikely+0xce8): Section mismatch in reference from the function prepare_page_table() to the (unknown reference) .init.data:(unknown) > The function prepare_page_table() references > the (unknown reference) __initdata (unknown). > This is often because prepare_page_table lacks a __initdata > annotation or the annotation of (unknown) is wrong. > > Mark the function as __init to avoid the warning regardless of the > inlining. > > Signed-off-by: Arnd Bergmann I think the inline should be dropped here. Either inlining is absolutely required for correct code generation (which is rare), or the inline is optional, and better left up to the compiler, especially given that this is __init code so the time/space tradeoff is moot anyway. With or without that change, Acked-by: Ard Biesheuvel > --- > arch/arm/mm/mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index 051f4f82414b..5220b8147f40 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -1246,7 +1246,7 @@ void __init adjust_lowmem_bounds(void) > memblock_set_current_limit(memblock_limit); > } > > -static inline void prepare_page_table(void) > +static inline __init void prepare_page_table(void) > { > unsigned long addr; > phys_addr_t end; > -- > 2.29.2 >