Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2958897rwb; Mon, 5 Sep 2022 04:26:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7SYoSQLLGD6Dcl+DC1bzpxeJTK7gDoUpn5c26HvS+BwI21vaJ8BMn48NwvTvyfO3HW6DRF X-Received: by 2002:a17:90a:d991:b0:1fd:ecc8:9991 with SMTP id d17-20020a17090ad99100b001fdecc89991mr19095195pjv.233.1662377186514; Mon, 05 Sep 2022 04:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662377186; cv=none; d=google.com; s=arc-20160816; b=VO3wDLBtDgDwkSZe9p1VJN8mo8fQQVTooUzDiZEtVBNWD7vz0A1GHG6vNDq7LEjJjp N1oM1UY0Dv+I/jqFy6b3qFF8ifpT0hUjRF/HFv/W5cIK4YONXH2XA2qqa4Pwvuq8DwHX USlr4hYTzFQh+q1NUHBK/0rzApbolgZPuSBe3ZtcU8RAPevVyh/CtPCqDk4j5XGE+9ku s1n2r7RBl+6ZPq0LeB41oQzXgkO7P6Bs01W0ge5Uc+sHZigQKG64m/Rr1UdK42zMjceH MzdWNPu8I3uzZSo9vdEVLvNDNfaAYSNhIsOLn7bC4KXgBrXHoffUuzEPfBG4GBjJ2gYI +wdA== 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=yBh6EHT/k5ZAZZzEZ6PaiTrlP1vNZiIq5WF+XCOFE/c=; b=Of7+grYtdGYY2Dt4LBOF0tZJ8P9ObLg29x6yhhom3eSNERZWNN87m1T021HnvqvU2Q zBPABfNAZRhDY0LtudO7qso1Qr093Qz7gqFk9CZ6cDXGlzDobSlRKA/8ygbcpI48Bwp2 gEmKVRVpwpTDJU6Ma5HKUGdaJKI7J9YkLoamrS0J2Zo2ODcHU8DNyt7hUgxAec5jdrP3 siqZN1S/bIMsqpIkgQ62AQhCevb9uWm5TzJpzknlVbhgQBuMPH8Es1O5XOixxwVwcvwW seU9GARpCGaTH1xMWKh1PZdUN9nO3W+pcFg40exQz477veTBDOhoOIK1JZJKykT8gx1f 89aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZpIQhpmF; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a170902dacf00b00172be445d0dsi6732539plx.414.2022.09.05.04.26.02; Mon, 05 Sep 2022 04:26: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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZpIQhpmF; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237826AbiIEK3c (ORCPT + 99 others); Mon, 5 Sep 2022 06:29:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237753AbiIEK3U (ORCPT ); Mon, 5 Sep 2022 06:29:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD90023BE1 for ; Mon, 5 Sep 2022 03:29:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1379FB8102E for ; Mon, 5 Sep 2022 10:29:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22AD6C433D6; Mon, 5 Sep 2022 10:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662373756; bh=WlJQ2stKL5wf+I/xSf6BcWn5KmuI9TkM3tH0O9cnh3w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZpIQhpmFit4FkPay59RFIocVuFZ4MW1FVM5Vjy4riQQTd1torqq3lf1ps2t2H15zy 12P12r1QtqRDQGSojls6fVzEhQdjVb1JGl8b3ERFSl4FJR+54jo2gu2cqrcd5Du1rH 2ZAr6fq3Nmw9mC706pAvdJoljWjvo+16vEw6PvewRgARpH6SNS0U/h36iNbL2K1svJ Qyq3ugBNsht1uf8/AIbjEzg8ay3S+T8ilc+8pbeA0Fil04a2+0vJJOt5uwOvRW6tng WDBmBUq0f4RIeTmd5B62vjMvS7i/LpvyrYp4LBOi4rAfI46jRGKsxgKp6V02xcDrl5 9j/soiF9+NlAg== Date: Mon, 5 Sep 2022 13:28:58 +0300 From: Mike Rapoport To: Baoquan He 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 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. -- Sincerely yours, Mike.