Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp944373pxk; Thu, 17 Sep 2020 22:32:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqZBxUf9h8hShDqDd4pS54V3mxXiVPxUKCrfZ0fPFaSm/AYqahVfSZkqxSsIKMMci0h4nt X-Received: by 2002:a05:6402:489:: with SMTP id k9mr36139049edv.287.1600407154650; Thu, 17 Sep 2020 22:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600407154; cv=none; d=google.com; s=arc-20160816; b=y/ZReCsjHVEcahioNNqMnriD1tsEMACP+qd/rra0XurGm3AHNAcBgN28475guOez+s dfrncGEwZVIZ9AEX6h15F+Jek+d/v4byIvbnJdO3sx0RkcpIaWpT3lgG2cd9tO0Zqa+8 25vZtXIlFRgtEaNBUR9oCQHEp2TxkndlZpSaSbq+DAezYhCP/9IZ407Vm+oQ8LtYteaI f6U+vcL44XvG5MTC8hLePROnTreYuIh2X2bm+68TUqPHbSgDL7iO+0lsBQVVAjwK59Em ZVaay/GrUrBnDifruQCHoK0B9cqpXE2EfHNFEujatfuq7mlZEC7e7DnZYVsA081rf47l P70g== 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=x/q3gUore7zMYpWMNytQTNB0y+piFCSTZflyi2KzLVc=; b=gk0I+YtVjTGWArAkKcDsG1NVSDqcvQUE1S0oXzAW31LofV1+WdLVl47VGEvBEgiizP fu+h1K4EwcD13gafgwi/a9N4NI7P7usRoKw2RpfrvUZIjQFPqcPNTNjWo2ddpWHAaDTr 8nxeDjROpcopjJrrD230rxQZ10FBxujO0YQROefy6jjNOuC+lkHW1hYGTj0K1ZTimwTF O5CiYJNAfVhLZpaoFR+srk76XujLRaebD+8ghpcvaO8WNmDjCGOuCfXrpU5Zjx39wdF3 dlElR+U23+aK6/sYNLpu6gmUc10z+Wb1UaH2J29M2WqxyUOcndXUfuDZP2QbnQB79Jx3 dwhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OBR8QHs0; 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 gg23si1444393ejb.327.2020.09.17.22.32.09; Thu, 17 Sep 2020 22:32:34 -0700 (PDT) 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=OBR8QHs0; 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 S1726472AbgIRF1X (ORCPT + 99 others); Fri, 18 Sep 2020 01:27:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:29175 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726344AbgIRF1W (ORCPT ); Fri, 18 Sep 2020 01:27:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600406841; 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=x/q3gUore7zMYpWMNytQTNB0y+piFCSTZflyi2KzLVc=; b=OBR8QHs0O4UY3V7rgRk+0X/fSY7O19bkstLVAfOu2rhEbzIuxhxMUMwSp0TBuBd/enNiSK nEA2SBU4HYaJa7Vt2x98fbPU0jSHzvy3ZDdIGLIuYrwF/oo+dr0St0gGbEdnvUzdFKoTIh WhFQhMxgOcVK/7JGnAmvwV/f/Txpdgc= 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-274-pRgiR_Y6MHShvn_qENIzvA-1; Fri, 18 Sep 2020 01:27:17 -0400 X-MC-Unique: pRgiR_Y6MHShvn_qENIzvA-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 63BC6801AAB; Fri, 18 Sep 2020 05:27:14 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-13-81.pek2.redhat.com [10.72.13.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00D125576E; Fri, 18 Sep 2020 05:27:00 +0000 (UTC) Date: Fri, 18 Sep 2020 13:26:57 +0800 From: Dave Young To: chenzhou Cc: catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, tglx@linutronix.de, mingo@redhat.com, bhe@redhat.com, corbet@lwn.net, John.P.donnelly@oracle.com, prabhakar.pkin@gmail.com, bhsharma@redhat.com, horms@verge.net.au, robh+dt@kernel.org, arnd@arndb.de, nsaenzjulienne@suse.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-doc@vger.kernel.org, guohanjun@huawei.com, xiexiuqi@huawei.com, huawei.libin@huawei.com, wangkefeng.wang@huawei.com Subject: Re: [PATCH v12 3/9] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel[_low]() Message-ID: <20200918052657.GA35322@dhcp-128-65.nay.redhat.com> References: <20200907134745.25732-1-chenzhou10@huawei.com> <20200907134745.25732-4-chenzhou10@huawei.com> <20200918030112.GA3356@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/18/20 at 11:57am, chenzhou wrote: > Hi Dave, > > > On 2020/9/18 11:01, Dave Young wrote: > > On 09/07/20 at 09:47pm, Chen Zhou wrote: > >> To make the functions reserve_crashkernel[_low]() as generic, > >> replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. > >> > >> Signed-off-by: Chen Zhou > >> --- > >> arch/x86/kernel/setup.c | 11 ++++++----- > >> 1 file changed, 6 insertions(+), 5 deletions(-) > >> > >> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > >> index d7fd90c52dae..71a6a6e7ca5b 100644 > >> --- a/arch/x86/kernel/setup.c > >> +++ b/arch/x86/kernel/setup.c > >> @@ -430,7 +430,7 @@ static int __init reserve_crashkernel_low(void) > >> unsigned long total_low_mem; > >> int ret; > >> > >> - total_low_mem = memblock_mem_size(1UL << (32 - PAGE_SHIFT)); > >> + total_low_mem = memblock_mem_size(CRASH_ADDR_LOW_MAX >> PAGE_SHIFT); > > total_low_mem != CRASH_ADDR_LOW_MAX > I just replace the magic number with macro, no other change. > Besides, function memblock_mem_size(limit_pfn) will compute the memory size > according to the actual system ram. > Ok, it is not obvious in patch this is 64bit only, I'm fine with this then.