[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211225072327.1807-1-thunder.leizhen@huawei.com>
Date: Sat, 25 Dec 2021 15:23:23 +0800
From: Zhen Lei <thunder.leizhen@...wei.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
<x86@...nel.org>, "H . Peter Anvin" <hpa@...or.com>,
<linux-kernel@...r.kernel.org>, Dave Young <dyoung@...hat.com>,
Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
Eric Biederman <ebiederm@...ssion.com>,
<kexec@...ts.infradead.org>,
Catalin Marinas <catalin.marinas@....com>,
"Will Deacon" <will@...nel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
<devicetree@...r.kernel.org>, Jonathan Corbet <corbet@....net>,
<linux-doc@...r.kernel.org>
CC: Zhen Lei <thunder.leizhen@...wei.com>,
Randy Dunlap <rdunlap@...radead.org>,
Feng Zhou <zhoufeng.zf@...edance.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Chen Zhou <dingguo.cz@...group.com>,
"John Donnelly" <John.p.donnelly@...cle.com>
Subject: [PATCH 0/4] kdump: add parse_crashkernel_high_low() to replace parse_crashkernel_{high|low}()
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
Powered by blists - more mailing lists