From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D31A5C433F5 for ; Thu, 16 Dec 2021 13:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=gLZ8jpX7aGhkMA7PfxdBs1E+yRNNxxqZYQoL/0fxcFs=; b=UcgGqiEwKUvGmZylR9gBtoMh5i Zh+1CQohRMXe6wyk8PEwE5EpsDtV+DCu5Af9ER4DTJdOMWLiHCCVnOrQTBZchG1CqAXFUJck0jY3K R9ZCNaMa06voyylR3iBC+/RT552v1GAq2LQWZ3ZTj77UC9Cw9+8Uh7hwUKnYlu82RGvgB4w0N+vwo 2ngsmR10LqVzQ4s/rLIqE5OCoBMfSoG74+MlGJq9D1M41OKCsAAxJ4Gw+Wk8HitOSVpS6nraWTRpy icx2QLjVB50PpE/Mi3qfzo+6+RiM73EAQJb1dRoOVCtGPfSTifzd2ALlV0xnoe2+kxWX2ttmaf8Yc 6thv3GGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqvL-005qV2-1V; Thu, 16 Dec 2021 13:35:55 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxqbe-005hC3-0w; Thu, 16 Dec 2021 13:15:36 +0000 Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JFCJw19VTzbjMD; Thu, 16 Dec 2021 21:15:12 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 16 Dec 2021 21:15:31 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 16 Dec 2021 21:15:30 +0800 Subject: Re: [PATCH v17 05/10] x86: kdump: move reserve_crashkernel[_low]() into crash_core.c To: Borislav Petkov CC: Thomas Gleixner , Ingo Molnar , , "H . Peter Anvin" , , Dave Young , Baoquan He , Vivek Goyal , Eric Biederman , , Catalin Marinas , Will Deacon , , Rob Herring , Frank Rowand , , "Jonathan Corbet" , , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou References: <20211210065533.2023-1-thunder.leizhen@huawei.com> <20211210065533.2023-6-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <217fb106-980c-0bd9-8398-d52ef255d51f@huawei.com> Date: Thu, 16 Dec 2021 21:15:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_051534_321417_18CA5934 X-CRM114-Status: GOOD ( 16.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/12/16 19:17, Borislav Petkov wrote: > 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. I agree with you. This makes the code look clear. I will do it, try to post v18 next Monday. > > 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. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel