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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81287C433FE for ; Tue, 14 Dec 2021 08:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbhLNIy6 (ORCPT ); Tue, 14 Dec 2021 03:54:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38868 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231997AbhLNIy5 (ORCPT ); Tue, 14 Dec 2021 03:54:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639472096; 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=djy24XBHKtgMaXuU5FrgICK75KROric6ztP2werGRpM=; b=HO+woAuEzgKBI2PqyAthMAR3lfyDBoRjNyGpUXUhj2U/pB++AxImACg3eiQHIoVYXDQoCS TKCvvoqL2NkQTEfPP5c0GJW67S2H8873gApOVLNnMYma3NNqn94/zg4lT37pFO2TrRrWIA TxU9GTv3sz1qc+PtyC7J2d7qgNlSJgQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-584-z_VrsVuLO4K3u9gVdVOekA-1; Tue, 14 Dec 2021 03:54:53 -0500 X-MC-Unique: z_VrsVuLO4K3u9gVdVOekA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3BFB392503; Tue, 14 Dec 2021 08:54:50 +0000 (UTC) Received: from localhost (ovpn-12-46.pek2.redhat.com [10.72.12.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 645AE196F1; Tue, 14 Dec 2021 08:54:43 +0000 (UTC) Date: Tue, 14 Dec 2021 16:54:40 +0800 From: Baoquan He To: Zhen Lei Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou Subject: Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel() Message-ID: <20211214085440.GA3023@MiWiFi-R3L-srv> References: <20211210065533.2023-1-thunder.leizhen@huawei.com> <20211210065533.2023-4-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211210065533.2023-4-thunder.leizhen@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/21 at 02:55pm, Zhen Lei wrote: > From: Chen Zhou > > To make the functions reserve_crashkernel() as generic, > replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. > > Signed-off-by: Chen Zhou > Signed-off-by: Zhen Lei If you made change to this patch, please remove the old Acked-by. If you didn't contribute change, Signed-off-by should be taken off. Compared this with the version I acked, only see memblock_free() -> memblock_phys_free() update which should be done from the rebase. So ack this one again, and please also consider adding Co-developed-by. > Tested-by: John Donnelly > Tested-by: Dave Kleikamp > Acked-by: Baoquan He > --- > 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 6424ee4f23da2cf..bb2a0973b98059e 100644 > --- a/arch/x86/kernel/setup.c > +++ b/arch/x86/kernel/setup.c > @@ -489,8 +489,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. > @@ -518,7 +519,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_phys_free(crash_base, crash_size); > return; > } > -- > 2.25.1 >