Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3025813rwb; Mon, 5 Sep 2022 05:27:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7K615C9IVA1/7q6DIbYc0MGNebrMEgyzA4OGB9hRy736QIhG5HaTlXD0y2FWVVhU3eCag2 X-Received: by 2002:a17:907:75c9:b0:73d:c6b2:538c with SMTP id jl9-20020a17090775c900b0073dc6b2538cmr35582348ejc.432.1662380868492; Mon, 05 Sep 2022 05:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662380868; cv=none; d=google.com; s=arc-20160816; b=mJBKxjBx1rlWDvooOGN4stk5BoK0S2eYQ54XVabqUsa/mV0N+H8eKoE0BIt911XkHQ xXNPtoJOkA346hiIKiLn/D9jlD1HsL2tFj6GAatel+a36AKrhP93i/xmqxB+xwW6vwLW QEhQpmSFrS68WxKGxjeA4yMoNSIQscxE4UwNSLR1w6TWCNBnO1SlD5GVIoKC0vKaRXc3 MtGfxFFY8Pu8oKGahObqNTWSogGU1uVvM2w6c5lE3OMJpL1X7Durmf17Z3ysat2c30vY lX4j44yia14Sf8IBRgz9lmICE/BsNUWXPd+sa+rGzSt4AZGXw67I1FAInjb9dtk2pR0d 7WNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2nwyShCFZbZOZb3RqUUSZIoZqzOmpN20eUJtd5XLm+U=; b=U6u2RoppfBIZuxK0y50cOLE8TiHNaTTDZ4fnM4dBWSDgUyJ0DaNj+/KoW/JfaHfl32 44yM3IsO2YY0/o0m47fB5ddStguaP7CzkelYgL8QXWCZtRYTMpZakbXWSwnMWtFkf+ux 1N5MSqVUgiV+9JopKjuGoVVm06yNwNhDNdbB7lNDAxVlQjCnHOnoQJ4kfHLmyIVtF3no RX5g6F3+wGBlPaiXTk/iXDvVqLqdy/UNXWDEgsf7BvMmgiiO7q/jI4RUejzMDNeMECRj vzzBR+TR83onO6H7CkXBa2m3bs3uXx/VAsmg3LIfqdmpSoGW1ku3Pp/6jojpFBlO52uU /fQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IwxRvA+o; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a056402032200b00448b8836866si6544182edw.586.2022.09.05.05.27.10; Mon, 05 Sep 2022 05:27:48 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IwxRvA+o; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237379AbiIEMIb (ORCPT + 99 others); Mon, 5 Sep 2022 08:08:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbiIEMI3 (ORCPT ); Mon, 5 Sep 2022 08:08:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846945E317 for ; Mon, 5 Sep 2022 05:08:28 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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.