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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1045EECAAD3 for ; Mon, 5 Sep 2022 12:08:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9AB39801DD; Mon, 5 Sep 2022 08:08:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 933D88D0050; Mon, 5 Sep 2022 08:08:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D42E801DD; Mon, 5 Sep 2022 08:08:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 6B9128D0050 for ; Mon, 5 Sep 2022 08:08:29 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4ADFB140D6D for ; Mon, 5 Sep 2022 12:08:29 +0000 (UTC) X-FDA: 79877909538.23.3BD8EB6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 0B5354007D for ; Mon, 5 Sep 2022 12:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662379707; 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=2nwyShCFZbZOZb3RqUUSZIoZqzOmpN20eUJtd5XLm+U=; b=IwxRvA+oogGeE0U8nWzS656xNbGRCClfT5uyCkKTC8tzTFycf32ypUp/rW/RtgR7HMTTyF SNTL3LtMEoU3IzIUnVHzM0mVYflcrw1iBS98WJCWd9SA6o35sRMEHx+yIjc4FciyN5d8Hj dBVuFs9ohrWhhvZ6b3PCIhuWca3uxww= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-502-VPX3JYRiOW28KDwXPsBZ3g-1; Mon, 05 Sep 2022 08:08:22 -0400 X-MC-Unique: VPX3JYRiOW28KDwXPsBZ3g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 869F880418F; Mon, 5 Sep 2022 12:08:21 +0000 (UTC) Received: from localhost (ovpn-12-58.pek2.redhat.com [10.72.12.58]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7B971121314; Mon, 5 Sep 2022 12:08:20 +0000 (UTC) Date: Mon, 5 Sep 2022 20:08:16 +0800 From: Baoquan He To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, ardb@kernel.org, guanghuifeng@linux.alibaba.com, mark.rutland@arm.com, will@kernel.org, linux-mm@kvack.org, thunder.leizhen@huawei.com, wangkefeng.wang@huawei.com, kexec@lists.infradead.org Subject: Re: [PATCH 1/2] arm64, kdump: enforce to take 4G as the crashkernel low memory end Message-ID: References: <20220828005545.94389-1-bhe@redhat.com> <20220828005545.94389-2-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662379708; a=rsa-sha256; cv=none; b=GjFG+KphoDfKB204yFbSXUFS3VKu/hahZwYIJ0tu4hCHADD4YWP8gr55qG+ezEwKqM+wKH OhtV1v+NyqYbbI+t4ObH8il5hgwmvV8io+PEYlP51poV/VBC3RAZ0uQGZcyLT6Q0t0k6tt y0t3lmAoDO+f4v3z8iJV83GKG/x3p94= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IwxRvA+o; spf=pass (imf12.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662379708; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2nwyShCFZbZOZb3RqUUSZIoZqzOmpN20eUJtd5XLm+U=; b=68XqMAcylP3CGuIWygNdlYCB9+xo3ehVOWp3tIZxwpRTjqk28PcWJSqpgweMGUJyuVq+Qu L9k+WASI/ApZhMyCLOgNqyPrXN36K7xMr3pmErP5LL8W0/sykAyKy6POKUcNjOxqM+Obkw 4LHaG769APs2YwC+p4BzLA01kKySQ1o= X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IwxRvA+o; spf=pass (imf12.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam09 X-Stat-Signature: 7t8k6j3cuqdp5y5oi8ku4q3b1ybbrwbe X-Rspamd-Queue-Id: 0B5354007D X-HE-Tag: 1662379707-594493 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 09/05/22 at 01:28pm, Mike Rapoport wrote: > On Thu, Sep 01, 2022 at 08:25:54PM +0800, Baoquan He wrote: > > On 09/01/22 at 10:24am, Mike Rapoport wrote: > > > > max_zone_phys() only handles cases when CONFIG_ZONE_DMA/DMA32 enabled, > > the disabledCONFIG_ZONE_DMA/DMA32 case is not included. I can change > > it like: > > > > static phys_addr_t __init crash_addr_low_max(void) > > { > > phys_addr_t low_mem_mask = U32_MAX; > > phys_addr_t phys_start = memblock_start_of_DRAM(); > > > > if ((!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) || > > (phys_start > U32_MAX)) > > low_mem_mask = PHYS_ADDR_MAX; > > > > return low_mem_mast + 1; > > } > > > > or add the disabled CONFIG_ZONE_DMA/DMA32 case into crash_addr_low_max() > > as you suggested. Which one do you like better? > > > > static phys_addr_t __init crash_addr_low_max(void) > > { > > if (!IS_ENABLED(CONFIG_ZONE_DMA) && !IS_ENABLED(CONFIG_ZONE_DMA32)) > > return PHYS_ADDR_MAX + 1; > > > > return max_zone_phys(32); > > } > > I like the second variant better. Sure, will change to use the 2nd one . Thanks.