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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B19DC2D0A3 for ; Thu, 12 Nov 2020 08:25:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12E2F20825 for ; Thu, 12 Nov 2020 08:25:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kUG/Q+mu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q1nGDHIg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12E2F20825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GM25Rh6r8+XsbnDxQkEqmsGh2K3eq8PQTvrewaN2HTY=; b=kUG/Q+mukTSD+gZNP2Q9loo7l bWSUS/duVGQ0rrlZYRfoJDLd7FXFwkIKe2vwTlPSLUukzF3EdHdL6vcJ4QhZAQUS0DP605y411Zrx 0PZ5TpnW16NAI2u6NJftlsHHjsJf7HosQ2q4etMqdH2nAMqG/3uet02MIobexwolm+nqSD7FV3C92 pwU59nZXoHaFz9fqzJ96+9lxwRHAzAmSG6zKgbs61m3zzvlQZYkeh0QwIWrafakAzr3TRoYm5V5BR lVoF6x1BtBDpyS5CpaXtkmZgq9cztyZfIJYKlrPrOt9FnUreqmmEZfIR4cjcM6cyS/IqsetzYV8dp F9oMTznew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7v3-00058r-J4; Thu, 12 Nov 2020 08:25:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd7uy-00057Y-8O; Thu, 12 Nov 2020 08:25:21 +0000 Received: from kernel.org (unknown [77.125.7.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2214F20825; Thu, 12 Nov 2020 08:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605169519; bh=uWlq5g2efEJEyEf0HFhZWgsDo31n3Eku7MoV4h7mxvU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q1nGDHIgUsRkPUQwR6MOSN6vGzERQBecgGM4PIsPLrnHLE2t3Hsua/Bj1MXi5Z5tv Co+Pf2lmCdcadAJKLpPH++5OwrXd8/IYOWaj0K3EpLrHSplmHZZbEGzz5iinasPzHz 4PRpumS2d+e1+B4IgTcLfg4thRgQV7UXAYtH9FPc= Date: Thu, 12 Nov 2020 10:25:09 +0200 From: Mike Rapoport To: Baoquan He Subject: Re: [PATCH v13 6/8] arm64: kdump: reimplement crashkernel=X Message-ID: <20201112082509.GL4758@kernel.org> References: <20201031074437.168008-1-chenzhou10@huawei.com> <20201031074437.168008-7-chenzhou10@huawei.com> <20201111015926.GD24747@MiWiFi-R3L-srv> <23389389-2855-50fd-25b7-4f7d4246bf0c@huawei.com> <20201111135448.GF8486@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201111135448.GF8486@MiWiFi-R3L-srv> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_032520_488156_687A1660 X-CRM114-Status: GOOD ( 22.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wangkefeng.wang@huawei.com, linux-doc@vger.kernel.org, chenzhou , catalin.marinas@arm.com, bhsharma@redhat.com, huawei.libin@huawei.com, guohanjun@huawei.com, will@kernel.org, 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 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 Wed, Nov 11, 2020 at 09:54:48PM +0800, Baoquan He wrote: > On 11/11/20 at 09:27pm, chenzhou wrote: > > Hi Baoquan, > ... > > >> #ifdef CONFIG_CRASH_DUMP > > >> static int __init early_init_dt_scan_elfcorehdr(unsigned long node, > > >> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > > >> index 1c0f3e02f731..c55cee290bbb 100644 > > >> --- a/arch/arm64/mm/mmu.c > > >> +++ b/arch/arm64/mm/mmu.c > > >> @@ -488,6 +488,10 @@ static void __init map_mem(pgd_t *pgdp) > > >> */ > > >> memblock_mark_nomap(kernel_start, kernel_end - kernel_start); > > >> #ifdef CONFIG_KEXEC_CORE > > >> + if (crashk_low_res.end) > > >> + memblock_mark_nomap(crashk_low_res.start, > > >> + resource_size(&crashk_low_res)); > > >> + > > >> if (crashk_res.end) > > >> memblock_mark_nomap(crashk_res.start, > > >> resource_size(&crashk_res)); > > >> diff --git a/kernel/crash_core.c b/kernel/crash_core.c > > >> index d39892bdb9ae..cdef7d8c91a6 100644 > > >> --- a/kernel/crash_core.c > > >> +++ b/kernel/crash_core.c > > >> @@ -321,7 +321,7 @@ int __init parse_crashkernel_low(char *cmdline, > > >> > > >> int __init reserve_crashkernel_low(void) > > >> { > > >> -#ifdef CONFIG_X86_64 > > >> +#if defined(CONFIG_X86_64) || defined(CONFIG_ARM64) > > > Not very sure if a CONFIG_64BIT checking is better. > > If doing like this, there may be some compiling errors for other 64-bit kernel, such as mips. > > > > > >> unsigned long long base, low_base = 0, low_size = 0; > > >> unsigned long low_mem_limit; > > >> int ret; > > >> @@ -362,12 +362,14 @@ int __init reserve_crashkernel_low(void) > > >> > > >> crashk_low_res.start = low_base; > > >> crashk_low_res.end = low_base + low_size - 1; > > >> +#ifdef CONFIG_X86_64 > > >> insert_resource(&iomem_resource, &crashk_low_res); > > >> +#endif > > >> #endif > > >> return 0; > > >> } > > >> > > >> -#ifdef CONFIG_X86 > > >> +#if defined(CONFIG_X86) || defined(CONFIG_ARM64) > > > Should we make this weak default so that we can remove the ARCH config? > > The same as above, some arch may not support kdump, in that case, compiling errors occur. > > OK, not sure if other people have better idea, oterwise, we can leave with it. > Thanks for telling. I think it would be better to have CONFIG_ARCH_WANT_RESERVE_CRASH_KERNEL in arch/Kconfig and select this by X86 and ARM64. Since reserve_crashkernel() implementations are quite similart on other architectures as well, we can have more users of this later. -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel