Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4679737pxj; Wed, 12 May 2021 10:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPN6BLwVT8BlEJITTiemCeG94fNb+IaJLzUdBeqm3B2IHc3I9b4PJS/QucDdbt++E+Iosp X-Received: by 2002:a05:6402:5111:: with SMTP id m17mr45220859edd.343.1620841394323; Wed, 12 May 2021 10:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620841394; cv=none; d=google.com; s=arc-20160816; b=thj8Jmhoz2ZmS64XnDMSdpe7irVbWf2b1BT3XZ7H3FteQDo2aZ50jAE/xPb2U3fW4b aZekVO+z0Ab92i0/JUFNu0OT/pYxH227XT81Xe+9aBL1ZmJUzXoqNGXRwn7T1PWruC0U H/BcWy2SsO3LoCZr3bGXJTiXz4dDqh8zJkoAv46IIxKUlACPsuv+Kffs9LDnmOSF6h6k 8RVoc0WBxasIHDI2Ut99ZOYEWzFXTMLuc3oFLtq1+IG6qaaOTX2/TkXTWEbfwBvWh6Lz Wz12xzEe9wnYjAst2yuGUQI34/oAlP5YZSVAEUy8tDY9cXhA8bBUQWe0j2iOZlNFoDeu nsSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MUMVVEPIi+fp286GTospLVkzr/2FgApxmzMuvYmXtsY=; b=dxLw67qmWR++OSimPXkRkvWY6pfd7FW4O8fga5/BR4U1go3459YrFvsdFkJGRjMY74 x+tgRw3zf8VJp2wKrIl6i2n/mQrow3WR6vJfI95Yduf7scehXr99vFwT31nSxnA1o2/s FbrOjx/3431FPNij1l7F9WVBsePtGFq9bzHCuI4xH4aBEf5djyv4TFOZJSi1Bdh8oIO+ oU3rtcUG7y+GBEnf4gf0HYUMiWagT7H0Y7V7nQT9vCL9U4AcpbuMz4yLJKBlaF5IqLGI I17x+wC1sW97zcDZoiXphlQIM5VYJamv7EePbF6zOqsfgjnHtpEnUf2/zpaKYofop8Sl RKcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EBbS3hln; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si456925edj.328.2021.05.12.10.42.44; Wed, 12 May 2021 10:43:14 -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=@linuxfoundation.org header.s=korg header.b=EBbS3hln; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349611AbhELRmm (ORCPT + 99 others); Wed, 12 May 2021 13:42:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:49996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239986AbhELQQs (ORCPT ); Wed, 12 May 2021 12:16:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57D1A61D62; Wed, 12 May 2021 15:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620834187; bh=s7GYJLD9H2ET5g+aXU4rGsR/doxp68Fju7SWvx9sD6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EBbS3hlnc8P+dSEbdgk9Y/zQoHonu8nD6cePxhNbpBGjZxNvYuJyEBzBju1jz8r12 N+nSfcfI8oW59OE/rZahMB0yMwdShBrtIbBrMB+rEw6A1ZHls9c/v8WKEmiZSdCkwM qoW8DDpsscU0yge2cSVLqGaOs2ycwCDsj27jjAIE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Michael Ellerman , Sasha Levin Subject: [PATCH 5.11 408/601] powerpc/fadump: Mark fadump_calculate_reserve_size as __init Date: Wed, 12 May 2021 16:48:05 +0200 Message-Id: <20210512144841.268839292@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144827.811958675@linuxfoundation.org> References: <20210512144827.811958675@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit fbced1546eaaab57a32e56c974ea8acf10c6abd8 ] If fadump_calculate_reserve_size() is not inlined, there is a modpost warning: WARNING: modpost: vmlinux.o(.text+0x5196c): Section mismatch in reference from the function fadump_calculate_reserve_size() to the function .init.text:parse_crashkernel() The function fadump_calculate_reserve_size() references the function __init parse_crashkernel(). This is often because fadump_calculate_reserve_size lacks a __init annotation or the annotation of parse_crashkernel is wrong. fadump_calculate_reserve_size() calls parse_crashkernel(), which is marked as __init and fadump_calculate_reserve_size() is called from within fadump_reserve_mem(), which is also marked as __init. Mark fadump_calculate_reserve_size() as __init to fix the section mismatch. Additionally, remove the inline keyword as it is not necessary to inline this function; the compiler is still free to do so if it feels it is worthwhile since commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely"). Fixes: 11550dc0a00b ("powerpc/fadump: reuse crashkernel parameter for fadump memory reservation") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1300 Link: https://lore.kernel.org/r/20210302195013.2626335-1-nathan@kernel.org Signed-off-by: Sasha Levin --- arch/powerpc/kernel/fadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 8482739d42f3..eddf362caedc 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -292,7 +292,7 @@ static void fadump_show_config(void) * that is required for a kernel to boot successfully. * */ -static inline u64 fadump_calculate_reserve_size(void) +static __init u64 fadump_calculate_reserve_size(void) { u64 base, size, bootmem_min; int ret; -- 2.30.2