From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B33BC433DB for ; Thu, 18 Feb 2021 03:31:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4AED64D7F for ; Thu, 18 Feb 2021 03:31:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4AED64D7F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2fP0pudHP2eFpaUClVNJFHOIA9A8fsv2clDjkftc11Y=; b=qYNNScBWYhR/u4VJxS10nquSU JGqC4+EpLfhwX3/ZgmS8Ke7i/lQ2hch/wEGcosBQjJ2lF8SJfpHjIAOZY8uKy7tzVNYDtMg3GD6bV JbuUw2SOOOWGcCPvI8IyOu1P3Zg7l/o+z1g5zuhevvMIWqrU6yibnyLYjj6Z7b1SEkThx64HnjWWs +po8YDDSGAaTDDAw9cLYEhLgoNtYURK9rAnOBHnXYH5Zna3WP6BgxIKqXu8ln/XNRtVkaEOh8RZ3f IFf6/13mRC3+RhStfCAtrxe1Ve4srfZFMwRqAwxGmKuj8prvxWgcH3Ew2gzyEYGKH3N9Wq/fHcQXm Yf81jk4AA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCa0K-0005kN-LJ; Thu, 18 Feb 2021 03:29:24 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCa0I-0005jy-4z for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2021 03:29:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613618961; 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=DoMp21k95Jp6kwK2dHRqLcGVCEPrre4aoDuTP2Iaam4=; b=OamrIEH+VEGnZLPwittGP4uYK8MJoEF9GcmCLk/j+ZYMXvqwe1jmWdVErjlLIrqiNMcwNJ n4fCfrZnXE780e0knojYcqd4nAE2B7Q/BlEDX50+NOCCNK3wkDXVK9q6TJ+yALg4NfgaS/ 9H/agavA54aqlus4t0rFUxF/AeU0PZQ= 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-191-51wJf5h3NYaw5muEIpHCEg-1; Wed, 17 Feb 2021 22:29:15 -0500 X-MC-Unique: 51wJf5h3NYaw5muEIpHCEg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 78CB51005501; Thu, 18 Feb 2021 03:29:12 +0000 (UTC) Received: from localhost (ovpn-12-112.pek2.redhat.com [10.72.12.112]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3E14100164C; Thu, 18 Feb 2021 03:29:08 +0000 (UTC) Date: Thu, 18 Feb 2021 11:29:06 +0800 From: Baoquan He To: Chen Zhou Subject: Re: [PATCH v14 01/11] x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN Message-ID: <20210218032607.GD2871@MiWiFi-R3L-srv> References: <20210130071025.65258-1-chenzhou10@huawei.com> <20210130071025.65258-2-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210130071025.65258-2-chenzhou10@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210217_222922_353574_660F4E4E X-CRM114-Status: GOOD ( 18.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, John.P.donnelly@oracle.com, wangkefeng.wang@huawei.com, xiexiuqi@huawei.com, arnd@arndb.de, horms@verge.net.au, corbet@lwn.net, catalin.marinas@arm.com, dyoung@redhat.com, guohanjun@huawei.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-doc@vger.kernel.org, mingo@redhat.com, james.morse@arm.com, nsaenzjulienne@suse.de, huawei.libin@huawei.com, prabhakar.pkin@gmail.com, tglx@linutronix.de, will@kernel.org, rppt@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 01/30/21 at 03:10pm, Chen Zhou wrote: > Move CRASH_ALIGN to header asm/kexec.h for later use. Besides, the > alignment of crash kernel regions in x86 is 16M(CRASH_ALIGN), but > function reserve_crashkernel() also used 1M alignment. So just > replace hard-coded alignment 1M with macro CRASH_ALIGN. > > Suggested-by: Dave Young > Suggested-by: Baoquan He > Signed-off-by: Chen Zhou > Tested-by: John Donnelly > --- > arch/x86/include/asm/kexec.h | 3 +++ > arch/x86/kernel/setup.c | 5 +---- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > index 6802c59e8252..be18dc7ae51f 100644 > --- a/arch/x86/include/asm/kexec.h > +++ b/arch/x86/include/asm/kexec.h > @@ -18,6 +18,9 @@ > > # define KEXEC_CONTROL_CODE_MAX_SIZE 2048 > > +/* 16M alignment for crash kernel regions */ > +#define CRASH_ALIGN SZ_16M > + > #ifndef __ASSEMBLY__ > > #include > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > index 3412c4595efd..da769845597d 100644 > --- a/arch/x86/kernel/setup.c > +++ b/arch/x86/kernel/setup.c > @@ -390,9 +390,6 @@ static void __init memblock_x86_reserve_range_setup_data(void) > > #ifdef CONFIG_KEXEC_CORE > > -/* 16M alignment for crash kernel regions */ > -#define CRASH_ALIGN SZ_16M > - > /* > * Keep the crash kernel below this limit. > * > @@ -510,7 +507,7 @@ static void __init reserve_crashkernel(void) > } else { > unsigned long long start; > > - start = memblock_phys_alloc_range(crash_size, SZ_1M, crash_base, > + start = memblock_phys_alloc_range(crash_size, CRASH_ALIGN, crash_base, > crash_base + crash_size); Looks good to me, thx. Acked-by: Baoquan He > if (start != crash_base) { > pr_info("crashkernel reservation failed - memory is in use.\n"); > -- > 2.20.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel