Skip to content

Commit 75bc255

Browse files
Baoquan Heakpm00
authored andcommitted
crash: clean up kdump related config items
By splitting CRASH_RESERVE and VMCORE_INFO out from CRASH_CORE, cleaning up the dependency of FA_DMUMP on CRASH_DUMP, and moving crash codes from kexec_core.c to crash_core.c, now we can rearrange CRASH_DUMP to depend on KEXEC_CORE, and make CRASH_DUMP select CRASH_RESERVE and VMCORE_INFO. KEXEC_CORE won't select CRASH_RESERVE and VMCORE_INFO any more because KEXEC_CORE enables codes which allocate control pages, copy kexec/kdump segments, and prepare for switching. These codes are shared by both kexec reboot and crash dumping. Doing this makes codes and the corresponding config items more logical (the right item depends on or is selected by the left item). PROC_KCORE -----------> VMCORE_INFO |----------> VMCORE_INFO FA_DUMP----| |----------> CRASH_RESERVE ---->VMCORE_INFO / |---->CRASH_RESERVE KEXEC --| /| |--> KEXEC_CORE--> CRASH_DUMP-->/-|---->PROC_VMCORE KEXEC_FILE --| \ | \---->CRASH_HOTPLUG KEXEC --| |--> KEXEC_CORE--> kexec reboot KEXEC_FILE --| Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Baoquan He <[email protected]> Cc: Al Viro <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Hari Bathini <[email protected]> Cc: Pingfan Liu <[email protected]> Cc: Klara Modin <[email protected]> Cc: Michael Kelley <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Yang Li <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 02aff84 commit 75bc255

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kernel/Kconfig.kexec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ config VMCORE_INFO
99
bool
1010

1111
config KEXEC_CORE
12-
select VMCORE_INFO
13-
select CRASH_RESERVE
1412
bool
1513

1614
config KEXEC_ELF
@@ -99,8 +97,11 @@ config KEXEC_JUMP
9997

10098
config CRASH_DUMP
10199
bool "kernel crash dumps"
100+
default y
102101
depends on ARCH_SUPPORTS_CRASH_DUMP
103-
select KEXEC_CORE
102+
depends on KEXEC_CORE
103+
select VMCORE_INFO
104+
select CRASH_RESERVE
104105
help
105106
Generate crash dump after being started by kexec.
106107
This should be normally only set in special crash dump kernels

0 commit comments

Comments
 (0)