From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 16 Dec 2021 12:17:10 +0100 From: Borislav Petkov Subject: Re: [PATCH v17 05/10] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c Message-ID: References: <20211210065533.2023-1-thunder.leizhen@huawei.com> <20211210065533.2023-6-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211210065533.2023-6-thunder.leizhen@huawei.com> 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: Zhen Lei Cc: Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Baoquan He , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou On Fri, Dec 10, 2021 at 02:55:28PM +0800, Zhen Lei wrote: > + * reserve_crashkernel() - reserves memory for crash kernel > + * > + * This function reserves memory area given in "crashkernel=" kernel command > + * line parameter. The memory reserved is used by dump capture kernel when > + * primary kernel is crashing. > + */ > +void __init reserve_crashkernel(void) 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. This set of functions is a mess and there's no better time for cleaning it up and documenting it properly than when you move it to generic code. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec