Re: [PATCH v12 3/9] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel[_low]()
From: Dave Young <hidden>
Date: 2020-09-18 05:27:24
Also in:
kexec, linux-doc, lkml
From: Dave Young <hidden>
Date: 2020-09-18 05:27:24
Also in:
kexec, linux-doc, lkml
On 09/18/20 at 11:57am, chenzhou wrote:
Hi Dave, On 2020/9/18 11:01, Dave Young wrote:quoted
On 09/07/20 at 09:47pm, Chen Zhou wrote:quoted
To make the functions reserve_crashkernel[_low]() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou <redacted> --- arch/x86/kernel/setup.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d7fd90c52dae..71a6a6e7ca5b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c@@ -430,7 +430,7 @@ static int __init reserve_crashkernel_low(void) unsigned long total_low_mem; int ret; - total_low_mem = memblock_mem_size(1UL << (32 - PAGE_SHIFT)); + total_low_mem = memblock_mem_size(CRASH_ADDR_LOW_MAX >> PAGE_SHIFT);total_low_mem != CRASH_ADDR_LOW_MAXI just replace the magic number with macro, no other change. Besides, function memblock_mem_size(limit_pfn) will compute the memory size according to the actual system ram.
Ok, it is not obvious in patch this is 64bit only, I'm fine with this then. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel