Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1956155rwl; Fri, 24 Mar 2023 19:15:27 -0700 (PDT) X-Google-Smtp-Source: AKy350Yg64TRO8ECYNZfD1phB24x0qUnxqVeJPF5wWF3f0lWMRO8bjRM3V9Mmr6I8p7y8TXZGdol X-Received: by 2002:a17:907:a781:b0:93b:2d0b:b60e with SMTP id vx1-20020a170907a78100b0093b2d0bb60emr5501787ejc.74.1679710526882; Fri, 24 Mar 2023 19:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679710526; cv=none; d=google.com; s=arc-20160816; b=y44mNO3wlhdsA7O3n6q5saPhx5Z1ayomFLu/h6Emgi1UtiQD7p0GqpV+Fhqac0zRaL p3Yj8ZMJv1tB2XhgJIsjYX0cXAVkBc1jMIMOoS7vMiSYllTkJnTf3PkpDqANxyXfbQCx w6vi7W27P0VYGbx5uU4bxTjldaiP118vU6c8e+UEun9iDBPCc0nAL7vFmAtYtuUErdjr 3pjABYxDrFfJ+8RoDS8YoEypKPOpqG+geMbdmNYFv6V/ratskcAEKDd+rVZv2f+oun95 lUMxFdJjYbAsfZ3DO2nJSZhRQAIzU7AhOc/FSgHS3o0u4ytE+Snw/nUNEWNSmOYA1OpZ OuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=yxAFA4Vp7pI/wGqQtc6qEU2v7OLrxwjwqWUlVNGIhhw=; b=XMQSQVC8rTGa0ApA+c2dfXDRMqEgWmV9MeiEBTPPZ/BTWHy1e1dXZEr1TnKM8S0vY1 4A+aOW5CxpJk/9vTg9BfvjQFSTXM+acOXTNq41jFvdVIjTYn4S8/OeJQT1oYF1OMlT1d TISM9tzLcTLg9qnNIrNsC8dLae8AG6RX88cwC1G6B7q6Rvfu3gvh0+RzbR4KENN40eyr vw9SFxpKnhiKkZZlLq7fAEb56apcqkg1/JajfwOGY6ijVPdDjZRW77nHzTfova4w4YIV 6oibAckHAxBEsxJTBKwJygKxFJMoI7e0dlcPHq6ToioDHFn3j00GSJ28byNSh8kN0L6T i7BA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz8-20020a170906cd0800b00928fca4e16csi17994502ejb.962.2023.03.24.19.15.01; Fri, 24 Mar 2023 19:15:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231508AbjCYCFd (ORCPT + 99 others); Fri, 24 Mar 2023 22:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbjCYCFc (ORCPT ); Fri, 24 Mar 2023 22:05:32 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 554C35BBE for ; Fri, 24 Mar 2023 19:05:30 -0700 (PDT) Received: from dggpemm500006.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Pk2RJ4mFczKtNX; Sat, 25 Mar 2023 10:03:08 +0800 (CST) 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.2507.21; Sat, 25 Mar 2023 10:04:34 +0800 Subject: Re: [PATCH 3/3] arm64: kdump: defer the crashkernel reservation for platforms with no DMA memory zones To: Baoquan He , CC: , , , , , , , References: <20230324131838.409996-1-bhe@redhat.com> <20230324131838.409996-4-bhe@redhat.com> From: "Leizhen (ThunderTown)" Message-ID: <3653555d-3302-fc40-c917-963b029fc839@huawei.com> Date: Sat, 25 Mar 2023 10:04:33 +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: <20230324131838.409996-4-bhe@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit 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-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/3/24 21:18, Baoquan He wrote: > In commit 031495635b46 ("arm64: Do not defer reserve_crashkernel() for > platforms with no DMA memory zones"), reserve_crashkernel() is called > much earlier in arm64_memblock_init() to avoid causing base apge > mapping on platforms with no DMA meomry zones. > > With taking off protection on crashkernel memory region, no need to call > reserve_crashkernel() specially in advance. The deferred invocation of > reserve_crashkernel() in bootmem_init() can cover all cases. > > Signed-off-by: Baoquan He > --- > arch/arm64/include/asm/memory.h | 5 ----- > arch/arm64/mm/init.c | 6 +----- > 2 files changed, 1 insertion(+), 10 deletions(-) > > diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h > index 78e5163836a0..efcd68154a3a 100644 > --- a/arch/arm64/include/asm/memory.h > +++ b/arch/arm64/include/asm/memory.h > @@ -374,11 +374,6 @@ static inline void *phys_to_virt(phys_addr_t x) > }) > > void dump_mem_limit(void); > - > -static inline bool defer_reserve_crashkernel(void) > -{ > - return IS_ENABLED(CONFIG_ZONE_DMA) || IS_ENABLED(CONFIG_ZONE_DMA32); > -} > #endif /* !ASSEMBLY */ > > /* > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 58a0bb2c17f1..b888de59e0b7 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -408,9 +408,6 @@ void __init arm64_memblock_init(void) > > early_init_fdt_scan_reserved_mem(); > > - if (!defer_reserve_crashkernel()) > - reserve_crashkernel(); > - > high_memory = __va(memblock_end_of_DRAM() - 1) + 1; > } > > @@ -457,8 +454,7 @@ void __init bootmem_init(void) > * request_standard_resources() depends on crashkernel's memory being > * reserved, so do it here. > */ > - if (defer_reserve_crashkernel()) > - reserve_crashkernel(); > + reserve_crashkernel(); > > memblock_dump_all(); > } Some comments also need to be deleted, above the definition of arm64_dma_phys_limit in arch/arm64/mm/init.c > -- Regards, Zhen Lei