diff mbox series

ARM: kdump: 2nd kernel should use strict pfn_valid in SPARSEMEM platform

Message ID 20190213044757.62597-1-chenzhou10@huawei.com (mailing list archive)
State New, archived
Headers show
Series ARM: kdump: 2nd kernel should use strict pfn_valid in SPARSEMEM platform | expand

Commit Message

chenzhou Feb. 13, 2019, 4:47 a.m. UTC
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 <wangnan0@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 813d042..84b2ae7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1589,7 +1589,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 HAVE_GENERIC_GUP
 	def_bool y