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=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 4041CC2D0A3 for ; Thu, 12 Nov 2020 08:38:34 +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 BC85220825 for ; Thu, 12 Nov 2020 08:38:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jNy4oAzX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dVvC9+Ea" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC85220825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=Tz8Ywww20r2hhmBxsKTPeOKAIttAwuv/whZdmqWOeWo=; b=jNy4oAzXULlaLnYWPsgUV4huc IEx90Epxk1l/u8l82Za3i2xNTBY5AIbBPWNgHfdMWT+GXPmjA834Mx/jSJsiKsuDVBMuYe8l/jIqt 4T2Z2G4VyfY7S62jD2ZIwZX7a54isJKUm0+MbdLkIepsDaFitoHAuV+g5/V603ZGg7gJ/KOaWcqMS H0RJnFWRRy3HGs7p1aJ4UqhjZ9Rgiy9KHDC1xWPZLDLkTUsEcbbPySv5q4v20tIMyIfchxd5C2sWx 4sO24BEn+TSiJXXsiW0gTTHMZ9sGhEm7CGT1JKbMUhwadsB9JAyMnzGRs881uEMjnJ1MyOHrYgQtE bNK9mJFyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd86O-0006uh-6Y; Thu, 12 Nov 2020 08:37:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd86K-0006tY-BX for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 08:37:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605170223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4rbM80lc2QHuCaufuKXk42IV+QKxU+fnFTQm9bwNqVY=; b=dVvC9+EaQrzNTUD7YTsOToXHmfCRJ1VUFoNlPQXuzi3Dkh2uUGXCOJTDnAK9aAemjvn1fx pvwz329kEACAolEWC36tmx1HrCTVHZ/nlf2vY7H8DegATJow/rkppcXU8Sx3lUAG3edul6 TIRKwTarqCU5BeHt2KQasfNn5eZLogY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-DC-gKL_APRCgSIVLLOv0LQ-1; Thu, 12 Nov 2020 03:36:58 -0500 X-MC-Unique: DC-gKL_APRCgSIVLLOv0LQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D7C0E64157; Thu, 12 Nov 2020 08:36:55 +0000 (UTC) Received: from localhost (ovpn-12-196.pek2.redhat.com [10.72.12.196]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04AB15DA82; Thu, 12 Nov 2020 08:36:48 +0000 (UTC) Date: Thu, 12 Nov 2020 16:36:45 +0800 From: Baoquan He To: Mike Rapoport Subject: Re: [PATCH v13 6/8] arm64: kdump: reimplement crashkernel=X Message-ID: <20201112083645.GL8486@MiWiFi-R3L-srv> 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> <20201112082509.GL4758@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201112082509.GL4758@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_033704_452421_C4B7B0B1 X-CRM114-Status: GOOD ( 26.32 ) 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 11/12/20 at 10:25am, Mike Rapoport wrote: > 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. Yes, this sounds like a nice way. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel