From patchwork Thu Jun 26 10:07:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 4426941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 33299BEEAA for ; Thu, 26 Jun 2014 10:19:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CC22200E9 for ; Thu, 26 Jun 2014 10:19:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E3E52038D for ; Thu, 26 Jun 2014 10:19:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X06kJ-0005xW-7d; Thu, 26 Jun 2014 10:17:35 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X06kE-0005Yh-8E; Thu, 26 Jun 2014 10:17:31 +0000 Received: from 172.24.2.119 (EHLO lggeml409-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AQV38806; Thu, 26 Jun 2014 18:16:37 +0800 (CST) Received: from kernel-host.huawei (10.107.197.247) by lggeml409-hub.china.huawei.com (10.72.61.105) with Microsoft SMTP Server id 14.3.158.1; Thu, 26 Jun 2014 18:16:28 +0800 From: Wang Nan To: , , Subject: [PATCH] ARM: kdump: 2nd kernel should use strict pfn_valid in SPARSEMEM platform Date: Thu, 26 Jun 2014 18:07:39 +0800 Message-ID: <1403777259-28949-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.4 MIME-Version: 1.0 X-Originating-IP: [10.107.197.247] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.53ABF306.0067,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: b818d9592ef59c9a283abdf44283f6fa X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_031730_885035_5B20F147 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Wang Nan , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, takahiro.akashi@linaro.org, Li Zefan , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes an irrational limitation for crash dump kernel on ARM platform when SPARSEMEM enabled. Without this patch, crash reservation area for a crash dump kernel with SPARSEMEM selected must occupy a full section plus 1MiB. If not, elfcorehdr and some memory space used by the first kernel will unable to get accessed. This is caused by pfn_valid: fast pfn_valid ragards any pfn in a valid section as valid and prevents it to be ioremapped. This limitation wastes memory, because sections are always large and crash dump kernel should be as small as possible. This patch selects HAVE_ARCH_PFN_VALID for CRASH_DUMP, makes crash dump kernel to use strict version of pfn_valid(). Signed-off-by: Wang Nan Cc: Li Zefan --- This is the forth time I post this patch. The previous discussions can be retrived from: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256498.html http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/257472.html http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/260322.html The second thread discusses the limitation in detail, but non of previous discussion reaches a conclusion. --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 87b63fd..aca8ee0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1725,7 +1725,7 @@ config ARCH_SELECT_MEMORY_MODEL def_bool ARCH_SPARSEMEM_ENABLE config HAVE_ARCH_PFN_VALID - def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM + def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM || CRASH_DUMP config HIGHMEM bool "High Memory Support"