From patchwork Wed Oct 11 13:48:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9999695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DAA8C6037F for ; Wed, 11 Oct 2017 13:55:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD0DB28A49 for ; Wed, 11 Oct 2017 13:55:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C193A28A52; Wed, 11 Oct 2017 13:55:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5B57D28A49 for ; Wed, 11 Oct 2017 13:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=heSWVYXFhtYdnRB/2gXht9VoEjZSfPXFiHNiA45vAlY=; b=WUw dNPJpP16Lp9HDlYZ0ztQ3A3uFx2XGamVFDFlY6TMEOnaMazkisoNqUPogBiCZ8WZpATc/iGnc7k71 sFDGbqPNXUcaGXH1/umCkEbb2Vwcgnh1AUVrXzb/ps6VxGb/eetybYMHKxaraGfqt9CDbgtQwxD73 W6B5UGjDHtEBtu/v3/po1GXEZxujYX/KbLNowQ16FAd6cYY4jQFhC/D6I9zofMc/q5AqMwyGAAxkm nmF8vnHBsJuJTBmx53J+SCzs38atkKTgPOhMnrsy1sM5f9GNkRdphmqi3g3V8XHT2IPYaIOFPImzh xtXU1m/HjNCXQWmPY30auox4VUJTFWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2HTk-0001Zq-U3; Wed, 11 Oct 2017 13:55:20 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e2HTc-0008Vq-B5 for linux-arm-kernel@lists.infradead.org; Wed, 11 Oct 2017 13:55:18 +0000 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lk8aY-1dQTrP4BlS-00c8fM; Wed, 11 Oct 2017 15:49:30 +0200 From: Arnd Bergmann To: Russell King Subject: [PATCH] ARM: don't discard memblock for kexec Date: Wed, 11 Oct 2017 15:48:55 +0200 Message-Id: <20171011134925.3251410-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Zsk0LskhJJuXs1i3EM69vBJU+7jjTUPy9tf+iScHAUwAAAheMPC dt3x6ScD3Wuu23XM2qQpfAdWpBrAqLKj6leld5uxMcTHWYxVewYpTT+pTNn/TZfHV4G/h8s FL57fQrAnQvHncjWoB4crduXNp68KWA318VAYTGIcSKgmWoBqcUOPt9wPxA29St2Sb/m2c1 PPnSlWAlRJJTVN6tEfhDQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZrRudvi8DBE=:3LB5dP7Z73bn/8dy9CL0fi 1/G0zhhWtzMgImJrsAViNKeqIWUTvWbXQ5pDl8aGmlaEKikrq4dTnGaicgslm6otS9bbOIDwk qOIoxjXyM4XpwiIHAd9WFg0mobYiEQYsUc3Tct7QUrm7L0CKEuKvfVNPilhOzWz+IfGJrefaU wnzkNsWfxuZHJWCJKBZEjeLPXv7DsSFHVA0/1Tt6kR42npTTPjOwjf/50aAmyNFVxucu6XL92 iFaOcNY/xa4bVxSFYi2aVGSfutiThJbRRIYBaoRceldtzS0c8KOMNIRih2K/pRI3g0loPRr1+ FIu26E2mxTIKlC8rB8RDoL8euxLYNpZMC/c94jPsMWzakGl83sQ1Z9RAa5Mk5w80o/+V9ERNT ny5uuC0gqixM2EtEUp4PS8kRZHwyC13EcD5C2meoz+ymGZHsKaGn4lCHLIi7nP8uOLeKzp6wB i+wmMnOp1ltyUuo8L9jRtHaK3J5rHxPolwZ+BfNhr8vrX8nENGmrspXkgW5uQwqerE5Uv77Uy bvRQvYqxv0W4St8eqoG495T2J1oudLYgLNK3Zv1VZKgN8xrRaa7yLri5EVN0mx6Oi/Mh1FiZn OIunH4udrpQ8tRMNweP2GFjMrlE/xU9P45IjrMwRlHzMaimK2h2obti5IJ2tvb4UatcUhn+rV FYB52y1EL0fROz6Eb2Y5iPjVZw45+/m1+dtRBP5jgdLAqF5RLTTDesu5jZ5+jhM2mNxd4Fv6o IQgqSksquGY8BDz3hFhh1lkafNUiZL1cEATYwQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171011_065512_879432_3504FDFD X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Discarding the memblock arrays usually works, but causes problems with kexec, as pointed out by this kbuild warning: WARNING: vmlinux.o(.text+0x7c60): Section mismatch in reference from the function machine_kexec_prepare() to the function .meminit.text:memblock_is_region_memory() This lets us keep the memblock structures around whenever kexec is enabled, but otherwise still drops them. Fixes: cf1b09908a23 ("ARM: 8693/1: discard memblock arrays when possible") Signed-off-by: Arnd Bergmann Acked-by: Nicolas Pitre --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 75b8c7e79ebc..90922a090501 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2,7 +2,7 @@ config ARM bool default y select ARCH_CLOCKSOURCE_DATA - select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID + select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE