Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7125716pxb; Thu, 18 Feb 2021 02:01:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJMseAU+vNkyo7KqYo/3iw/6g8fNArPw+9gEq7RTZA5B/yztk+bhS1V96Ik7htWw5Faf5X X-Received: by 2002:a17:906:c1c1:: with SMTP id bw1mr3385117ejb.86.1613642481457; Thu, 18 Feb 2021 02:01:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613642481; cv=none; d=google.com; s=arc-20160816; b=STxEYgKlz/0N1NWzjgnqs24/hTzS/7vEBL5AQHRGbC9K5yLhNsUgJwP8gGNKcUPliQ 7GdbuXM/pITOKn/h1rGdFYlkKG4TN5NQOlbcUQjiGfE7P4cawO3qo+C4lC2dt3fFr+f/ m8JQdrlPJ++AV8ZEGy8ag86MaZ/+VrH/WJ70bwbWdfj6rgBQknUPkESQiApRrUllkHoQ Rb0K5gyFZYyUrbmHAnkskFEvAOwB6MzWqtFc6oU2lK9aOUI9rCb/gLepKLgWbqY5e1tS So/QdfIxMDtRo9HK7rq34ZDgQ/6X2kMhjayNK8BLy4N6OU+ga5ubPkogBrc7J44HzCrG Emyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sAY+HXKC92Dkn7QIHrCXETnJ9FMsLmpLXQYUUMdSfaU=; b=RgPoOwQ+gzR8BHrfF4GmfmDstS8jgr92tAc/xb/ilsF9DcmbEG0PLUL6+DUSkSX2h9 VCdxpTmK7ngHIp4I9mXp+axLLdPWpmU/7u5QHkCI6ViDzq8SXI8N8rDSX0lR7rhNGofe y+a8gUQP5fxngAK/cBE0mkaJUgK9C+qYPMmh/tbJRac2eWw4XQ8Xm9fdmZDn15zyHgrX skWTIbwajOuvM58wToTTcjZCohKo7Oa7HiEMmPwO+tGP2TA6G6swFffCL+UIgI32HU2B IQQyDQkQ2NZog3ng26LFMWs1wl7k/MDQLCSvhj3o2wmT28mxEcCS1B7C/zih29ZqM1I/ LcWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TrSBfWfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si3612471edm.154.2021.02.18.02.00.57; Thu, 18 Feb 2021 02:01:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TrSBfWfV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232151AbhBRJey (ORCPT + 99 others); Thu, 18 Feb 2021 04:34:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20673 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbhBRIZe (ORCPT ); Thu, 18 Feb 2021 03:25:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613636617; 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=sAY+HXKC92Dkn7QIHrCXETnJ9FMsLmpLXQYUUMdSfaU=; b=TrSBfWfVousNFJCYPpUKZCm7ySXu8FLjgs5Ip9PVInF74r+ElEqfu1wAExclRx2LNitvlQ cDAgXjbk6SPkM8EyCsxJvf51nnN2ljOkKKjqvQg1pBG+/bARCiD+NYmDhhP9A46Bzn3D8m gYqg4wUu+/nfCfCe8CtfkfV9o5gvtA8= 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-257-0zv4qIlnPt6Px3vCHxLeeQ-1; Thu, 18 Feb 2021 03:23:33 -0500 X-MC-Unique: 0zv4qIlnPt6Px3vCHxLeeQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97581814310; Thu, 18 Feb 2021 08:23:29 +0000 (UTC) Received: from localhost (ovpn-12-112.pek2.redhat.com [10.72.12.112]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B71EA61F59; Thu, 18 Feb 2021 08:23:25 +0000 (UTC) Date: Thu, 18 Feb 2021 16:23:23 +0800 From: Baoquan He To: Chen Zhou Cc: mingo@redhat.com, tglx@linutronix.de, rppt@kernel.org, dyoung@redhat.com, catalin.marinas@arm.com, will@kernel.org, nsaenzjulienne@suse.de, corbet@lwn.net, John.P.donnelly@oracle.com, prabhakar.pkin@gmail.com, horms@verge.net.au, robh+dt@kernel.org, arnd@arndb.de, james.morse@arm.com, xiexiuqi@huawei.com, guohanjun@huawei.com, huawei.libin@huawei.com, wangkefeng.wang@huawei.com, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [PATCH v14 03/11] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel() Message-ID: <20210218082241.GJ2871@MiWiFi-R3L-srv> References: <20210130071025.65258-1-chenzhou10@huawei.com> <20210130071025.65258-4-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210130071025.65258-4-chenzhou10@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/21 at 03:10pm, Chen Zhou wrote: > To make the functions reserve_crashkernel() as generic, > replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. > > Signed-off-by: Chen Zhou > Tested-by: John Donnelly > --- > arch/x86/kernel/setup.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > index 27470479e4a3..086a04235be4 100644 > --- a/arch/x86/kernel/setup.c > +++ b/arch/x86/kernel/setup.c > @@ -487,8 +487,9 @@ static void __init reserve_crashkernel(void) > if (!crash_base) { > /* > * Set CRASH_ADDR_LOW_MAX upper bound for crash memory, > - * crashkernel=x,high reserves memory over 4G, also allocates > - * 256M extra low memory for DMA buffers and swiotlb. > + * crashkernel=x,high reserves memory over CRASH_ADDR_LOW_MAX, > + * also allocates 256M extra low memory for DMA buffers > + * and swiotlb. > * But the extra memory is not required for all machines. > * So try low memory first and fall back to high memory > * unless "crashkernel=size[KMG],high" is specified. > @@ -516,7 +517,7 @@ static void __init reserve_crashkernel(void) > } > } > > - if (crash_base >= (1ULL << 32) && reserve_crashkernel_low()) { > + if (crash_base >= CRASH_ADDR_LOW_MAX && reserve_crashkernel_low()) { > memblock_free(crash_base, crash_size); > return; Acked-by: Baoquan He > } > -- > 2.20.1 >