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=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 827E8C31E4E for ; Fri, 14 Jun 2019 20:33:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 506562084D for ; Fri, 14 Jun 2019 20:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544426; bh=z8hc2If14umpMNWoQq+tqOqn1Cwo7yZ54o2Weu9Fmrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k+itoA/W88hjbDcce2KwcyeQOduyw63PVaXo5fVhNCHGP0gKjDs4I3vcBZ/cTO3CE CUr3lc9WgEgJqI0LSYycOZ1xcHKH3gkOFk6x1xqtAtfUduC5EFZvBTrhtnMEYsTAMq TjR/KrAIDrujqBi/wPm/Txkt0+55zV6hB0h4uBsA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726937AbfFNUdg (ORCPT ); Fri, 14 Jun 2019 16:33:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:53406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727617AbfFNUa1 (ORCPT ); Fri, 14 Jun 2019 16:30:27 -0400 Received: from sasha-vm.mshome.net (unknown [131.107.159.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F07A2184C; Fri, 14 Jun 2019 20:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560544226; bh=z8hc2If14umpMNWoQq+tqOqn1Cwo7yZ54o2Weu9Fmrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uBGf2Fmx7A0ZzOrZgYlXJvaO6WoeG/2kZgFbeOkUNFxxSGQdD+29oyaLTZqy6zq3k imnXtWsAkU01YHdPeo+/inW+jk013H1Gzlu+vhfuZw3h585XtDMrWfVhEztARxhF2s zVnID3JRNQR/21Tps/nluJ7UN36wOPidbvjdWmdw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Guenter Roeck , Max Filippov , Sasha Levin , linux-xtensa@linux-xtensa.org Subject: [PATCH AUTOSEL 4.14 11/27] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Date: Fri, 14 Jun 2019 16:30:00 -0400 Message-Id: <20190614203018.27686-11-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614203018.27686-1-sashal@kernel.org> References: <20190614203018.27686-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Guenter Roeck [ 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 08175df7a69e..66eefe1919a4 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