Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4733659pxj; Wed, 12 May 2021 11:59:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznklNUTljE685ONCW3N7iA6A2wvev9p2NsMN+pnWpoOK45RNYx4b6TugxDIQpxZN46xznn X-Received: by 2002:a17:907:33c5:: with SMTP id zk5mr11075613ejb.499.1620845881302; Wed, 12 May 2021 11:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620845881; cv=none; d=google.com; s=arc-20160816; b=STNiqfGnYGo4jmXSzci3SSlQ9zPeBuqTsFE9pUkwa1o8cEN2KrVgErwnjXo3c3fXQH Re66Q+eyoy4Ve7ooo222Skxpj3lSsbDW6XARaA7SdvNgthfZs1IY508+Xvk7rFMlbA2M DoDMIINAlV1gNzXITtBlrCkxvI8FWXIRelW1fDt4Bp504hnSTtCVBb0utU9KldTJwC8B Ti2JnGd4aadYXWPrT1ZDb5kp1SoBE+hoDjFr88vkrqqHexgbVsph74ArpRjXAZ4ow/7I 82GBqzUWMv7/CZ4fPrhZ+FTqY5lkPgkg9FSS3FnLZMJqT2sk9s1UMOibs/iV10vfoInF pBsQ== 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=k5RU7IxZBQya4JoOTiboovD2qrktgsbiIIY61sbWDHujPJmAcWh+DtavfeJU+dqDvB yrT7CNd8B5RuPrnD8P0/8/3AKX91UlbN70JDa3Smoi9J6R5ku2xZAzqyxEi1AUOXXSLm X5QsMsZMQK/tEZoaKNr4hC9ORjkdbDj6gKjq86t6m2taza9gEErLiuwirKe8hmq2vtl/ 4YxBwI5sWmp7vx8nqPRqWd0TYr3PFPNHDEpLk3M4p3S4y75fm8lG6ND9cHpAkz1SBn5L EsQ09UHisRxwJCgrLmH2h6rMm6ogD5fXrF0tyAAdq0mgJaIzNNZ4SfbcVgaxKx0w9GZI secw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ABCZoIdE; 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 m22si682255ejc.433.2021.05.12.11.57.37; Wed, 12 May 2021 11:58:01 -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=ABCZoIdE; 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 S1359563AbhELSxc (ORCPT + 99 others); Wed, 12 May 2021 14:53:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:33470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243971AbhELQmU (ORCPT ); Wed, 12 May 2021 12:42:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F6A161C4A; Wed, 12 May 2021 16:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620835726; bh=s7GYJLD9H2ET5g+aXU4rGsR/doxp68Fju7SWvx9sD6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABCZoIdEWr5blA9GkXlOnojvv/UY5h6IJ2qnA8OUAf+N2Z/zycRb8pyzKHiuuRBpp laioYb0KN6Ta5b8MNckGA4qXG8bGgQRkNoqqDKYfgTgww2hAf8sd3ABmeovb6bpa+C NCXD9cx3Pc9G2Ws8kGFwOZlV+yjws505AVn3ytR4= 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.12 461/677] powerpc/fadump: Mark fadump_calculate_reserve_size as __init Date: Wed, 12 May 2021 16:48:27 +0200 Message-Id: <20210512144852.680232863@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144837.204217980@linuxfoundation.org> References: <20210512144837.204217980@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