From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Subject: Re: [PATCH v13 1/8] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN References: <20201031074437.168008-1-chenzhou10@huawei.com> <20201031074437.168008-2-chenzhou10@huawei.com> <20201112075810.GJ4758@kernel.org> From: chenzhou Message-ID: <3beb3c41-5b58-e108-55bd-550c852d9eb2@huawei.com> Date: Thu, 12 Nov 2020 16:12:07 +0800 MIME-Version: 1.0 In-Reply-To: <20201112075810.GJ4758@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Mike Rapoport Cc: wangkefeng.wang@huawei.com, linux-doc@vger.kernel.org, catalin.marinas@arm.com, bhsharma@redhat.com, huawei.libin@huawei.com, guohanjun@huawei.com, will@kernel.org, bhe@redhat.com, corbet@lwn.net, mingo@redhat.com, dyoung@redhat.com, John.P.donnelly@oracle.com, arnd@arndb.de, xiexiuqi@huawei.com, horms@verge.net.au, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, james.morse@arm.com, prabhakar.pkin@gmail.com, nsaenzjulienne@suse.de On 2020/11/12 15:58, Mike Rapoport wrote: > Hi, > > On Sat, Oct 31, 2020 at 03:44:30PM +0800, Chen Zhou wrote: >> Move CRASH_ALIGN to header asm/kexec.h and replace the hard-coded >> alignment with macro CRASH_ALIGN in function reserve_crashkernel(). >> >> Suggested-by: Dave Young >> Signed-off-by: Chen Zhou >> Tested-by: John Donnelly >> --- >> arch/x86/include/asm/kexec.h | 3 +++ >> arch/x86/kernel/setup.c | 5 +---- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h >> index 6802c59e8252..8cf9d3fd31c7 100644 >> --- a/arch/x86/include/asm/kexec.h >> +++ b/arch/x86/include/asm/kexec.h >> @@ -18,6 +18,9 @@ >> >> # define KEXEC_CONTROL_CODE_MAX_SIZE 2048 >> >> +/* 2M alignment for crash kernel regions */ >> +#define CRASH_ALIGN SZ_16M > Please update the comment to match the code. Ok, thanks for pointing this mistake. Thanks, Chen Zhou > >> + >> #ifndef __ASSEMBLY__ >> >> #include >> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c >> index 84f581c91db4..bf373422dc8a 100644 >> --- a/arch/x86/kernel/setup.c >> +++ b/arch/x86/kernel/setup.c >> @@ -395,9 +395,6 @@ static void __init memblock_x86_reserve_range_setup_data(void) >> >> #ifdef CONFIG_KEXEC_CORE >> >> -/* 16M alignment for crash kernel regions */ >> -#define CRASH_ALIGN SZ_16M >> - >> /* >> * Keep the crash kernel below this limit. >> * >> @@ -515,7 +512,7 @@ static void __init reserve_crashkernel(void) >> } else { >> unsigned long long start; >> >> - start = memblock_phys_alloc_range(crash_size, SZ_1M, crash_base, >> + start = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, crash_base, >> crash_base + crash_size); >> if (start != crash_base) { >> pr_info("crashkernel reservation failed - memory is in use.\n"); >> -- >> 2.20.1 >> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec