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.3 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=ham 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 93F96C5517A for ; Wed, 11 Nov 2020 13:55:27 +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 180722072C for ; Wed, 11 Nov 2020 13:55:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bogZNs0D"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H5qdSKlM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 180722072C 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=/WwlS/opREAr1PTG6DRa1hMpFU5KtFLiqAc9gxhRwTU=; b=bogZNs0Dg1wm8pU6MMRpRuLI8 tc9qEBd96PZy+DKBLgjsq5QeQhbDC5qEwxGBHg4somHjcugbgiXdDTjGFjJmk9vp3U6YS0jaeRWyB aGvIzb+cWOTqdscRhugOa+Kt4JTC1Oe4LJOjdN5V80DektR6fYswe6lKlTwgkPrTZ1gPzgMMIpzjD fWw7aNBPdxyD+Y3zo3G5UbfEgGekSNekq7Fjf0PcCFuyAMcKeY/6Tvxj3dq9gTIjyPIBPFPgrN+dc l0ubL07+K3uxVMM4vFipJRbgIcw6yYqQecgVKnfOhs2xOPLz57V+nA5FxXRpjxT1b9fS5ivWCuJQK o6tyAFmLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcqaW-0001Pj-8z; Wed, 11 Nov 2020 13:55:04 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcqaT-0001OV-3C for linux-arm-kernel@lists.infradead.org; Wed, 11 Nov 2020 13:55:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605102899; 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=aMaHhSCKMeHb+h3vdBSxeg5btyZh1RbkohyGRVpWKe0=; b=H5qdSKlMzRPWnzXFx9OqAxeA9HuQAZNoy0atPJOp5Z9C++pZ+T8I6vv5pKPVEJTBfVIyzm eDu3x4bY0mGaGbd1ScTUiDmOmvMRwdx6lt7Pz0TJEMoxBQJfYSvEmvqmRDqlRJdZcDpIPe jEdOjN3wxLU7H2CmbEkz2mMgoVL2hFs= 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-308-IJvfncXCMY6jcUTWaZWueA-1; Wed, 11 Nov 2020 08:54:58 -0500 X-MC-Unique: IJvfncXCMY6jcUTWaZWueA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 159C11087D6A; Wed, 11 Nov 2020 13:54:55 +0000 (UTC) Received: from localhost (ovpn-12-35.pek2.redhat.com [10.72.12.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1F507366E; Wed, 11 Nov 2020 13:54:50 +0000 (UTC) Date: Wed, 11 Nov 2020 21:54:48 +0800 From: Baoquan He To: chenzhou Subject: Re: [PATCH v13 6/8] arm64: kdump: reimplement crashkernel=X Message-ID: <20201111135448.GF8486@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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <23389389-2855-50fd-25b7-4f7d4246bf0c@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201111_085501_304394_07617E9C X-CRM114-Status: GOOD ( 18.71 ) 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, 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/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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel