From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CBFCC43613 for ; Mon, 24 Jun 2019 10:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02D7F2146F for ; Mon, 24 Jun 2019 10:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370666; bh=zMp2ePy9UZCidN9RvyRX77OJYaD0oKbjuTufdWjNZuU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=H99IC8qdBFgsSyvfBNNJxlXP5hwbgpjMkkGuI7M1YJSCeL8wxuXRbYVewTS2aaLyH oOZzIHEx3HF0/GmaccVG1iWtQYKpUoiSVl8lPpY+sjCvs2rvIJwfebe63/WE8cc+CW R5Z+g0EelOJXCoM7r/s+Pp6tkEnNzp86i2DhPQX0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729692AbfFXKEY (ORCPT ); Mon, 24 Jun 2019 06:04:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:35882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729683AbfFXKEY (ORCPT ); Mon, 24 Jun 2019 06:04:24 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C8DF820848; Mon, 24 Jun 2019 10:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561370663; bh=zMp2ePy9UZCidN9RvyRX77OJYaD0oKbjuTufdWjNZuU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aHBWmbYT50cuT/uPZilEKF4UZC6JEy6klPnZfDYn5SwXvIvc3FM2sl1TB5Jl6wxtF T7yNSaIBN2/ONY5BK0Y3zjsNioB2bUEVyMGiQ2gPjw+CPygr4UW72cKGVdWcOttKOb moIUex/h0Mc8Y2lgT4+U9KGi1iK6sURBo/LuGwC8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Max Filippov , Sasha Levin Subject: [PATCH 4.19 44/90] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Date: Mon, 24 Jun 2019 17:56:34 +0800 Message-Id: <20190624092317.162158686@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092313.788773607@linuxfoundation.org> References: <20190624092313.788773607@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit adefd051a6707a6ca0ebad278d3c1c05c960fc3b ] Since commit 9012d011660ea5cf2 ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING"), xtensa:tinyconfig fails to build with section mismatch errors. WARNING: vmlinux.o(.text.unlikely+0x68): Section mismatch in reference from the function ___pa() to the function .meminit.text:memblock_reserve() WARNING: vmlinux.o(.text.unlikely+0x74): Section mismatch in reference from the function mem_reserve() to the function .meminit.text:memblock_reserve() FATAL: modpost: Section mismatches detected. This was not seen prior to the above mentioned commit because mem_reserve() was always inlined. Mark mem_reserve(() as __init_memblock to have it reside in the same section as memblock_reserve(). Signed-off-by: Guenter Roeck Message-Id: <1559220098-9955-1-git-send-email-linux@roeck-us.net> Signed-off-by: Max Filippov Signed-off-by: Sasha Levin --- arch/xtensa/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 351283b60df6..a285fbd0fd9b 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -310,7 +310,8 @@ extern char _SecondaryResetVector_text_start; extern char _SecondaryResetVector_text_end; #endif -static inline int mem_reserve(unsigned long start, unsigned long end) +static inline int __init_memblock mem_reserve(unsigned long start, + unsigned long end) { return memblock_reserve(start, end - start); } -- 2.20.1