mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] kdump: add parse_crashkernel_high_low() to replace parse_crashkernel_{high|low}()
@ 2021-12-25  7:23 Zhen Lei
  2021-12-25  7:23 ` [PATCH 1/4] kdump: add helper parse_crashkernel_high_low() Zhen Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zhen Lei @ 2021-12-25  7:23 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H . Peter Anvin, linux-kernel, Dave Young, Baoquan He,
	Vivek Goyal, Eric Biederman, kexec, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Rob Herring, Frank Rowand, devicetree,
	Jonathan Corbet, linux-doc
  Cc: Zhen Lei, Randy Dunlap, Feng Zhou, Kefeng Wang, Chen Zhou, John Donnelly

The bootup command line option crashkernel=Y,low is valid only when
crashkernel=X,high is specified. Putting their parsing into a separate
function makes the code logic clearer and easier to understand the strong
dependencies between them. So add parse_crashkernel_high_low() and use it
to repalce parse_crashkernel_{high|low}(). Then make the latter static,
and reduce two confusing parameters 'system_ram' and 'crash_base' of them.

All four patches in this series do the cleanups, no functional change. This
patchset is also a preparation for supporting reserve crashkernel above 4G
on arm64, and share code with x86.

The main proposal was made by Borislav Petkov.
> As I've already alluded to in another mail, ontop of this there should
> be a patch or multiple patches which clean this up more and perhaps even
> split it into separate functions doing stuff in this order:
>
> 1. Parse all crashkernel= cmdline options
> 2. Do all crash_base, crash_size etc checks
> 3. Do the memory reservations
>
> And all that supplied with comments explaining why stuff is being done.


Zhen Lei (4):
  kdump: add helper parse_crashkernel_high_low()
  x86/setup: Use parse_crashkernel_high_low() to simplify code
  kdump: make parse_crashkernel_{high|low}() static
  kdump: reduce unnecessary parameters of parse_crashkernel_{high|low}()

 arch/x86/kernel/setup.c    | 21 +++++++--------
 include/linux/crash_core.h |  7 +++--
 kernel/crash_core.c        | 54 +++++++++++++++++++++++++++++++-------
 3 files changed, 56 insertions(+), 26 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-25  7:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-25  7:23 [PATCH 0/4] kdump: add parse_crashkernel_high_low() to replace parse_crashkernel_{high|low}() Zhen Lei
2021-12-25  7:23 ` [PATCH 1/4] kdump: add helper parse_crashkernel_high_low() Zhen Lei
2021-12-25  7:23 ` [PATCH 2/4] x86/setup: Use parse_crashkernel_high_low() to simplify code Zhen Lei
2021-12-25  7:23 ` [PATCH 3/4] kdump: make parse_crashkernel_{high|low}() static Zhen Lei
2021-12-25  7:23 ` [PATCH 4/4] kdump: reduce unnecessary parameters of parse_crashkernel_{high|low}() Zhen Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®