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=unavailable 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 49B75C433E0 for ; Thu, 18 Feb 2021 04:17:14 +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 C9E9864E28 for ; Thu, 18 Feb 2021 04:17:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9E9864E28 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=K0e3zBUZECjH81wQRWLfWkM8hNbAlEN+Qwq98m7lD+A=; b=z1m0LoBMbGDvPwGNrN5M19v0d 9DowdCR8kg2caxuSx+aOHOAEY8YltwMKDhJF/ja3vFSbpkG83EwKBpcpn7RZ8TzYDbE0F0Qo0Gj7w fqwKH7CAUAORk68NG8rkcglos/HDxxqwJoK6wBRCjd+CtyxlvW8OdCH7Ffpp5lTS/LSy405a4SRXV +QTA2bgdCRJ8wz/f7vhI8l3QOl+GWkSXHeDnT72zj1aCIZrMmfXm7eDZ085IyKkb2AJ1xnROWej5V np+qq+1HziBnHyuqQVBbLogt9Iet98pqqj0EGD1iejnnoP44uAz6lwStAh6refoB1K5dY04H2/S3x yhlc/p6iA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCahu-00045s-67; Thu, 18 Feb 2021 04:14:26 +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 1lCahq-00045B-MV for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2021 04:14:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613621662; 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=emJvmHO6K5DoKcle3XfGbvke6XPq47tbyoxFu4GbpOg=; b=V1fJCLTJID2aqb8rKZWsbM8F0gf4muNo4JH3DlgXN92NN5ZJ6+9bhv3Bmhcm7lO6RI1vQY sY842zaD8wLlyBOnkVLqcpnTI9Nnzhzox8b7RHKdJPSMI6uBy7Jhk7fq4c5Wxxhuep0Rif 5uYbI1BSp2p6Yj2QK9FJHrU99jsHwSA= 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-401-wauykghLNGe1NIrrLr8z8Q-1; Wed, 17 Feb 2021 23:14:18 -0500 X-MC-Unique: wauykghLNGe1NIrrLr8z8Q-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 334E11020C22; Thu, 18 Feb 2021 04:14:15 +0000 (UTC) Received: from localhost (ovpn-12-112.pek2.redhat.com [10.72.12.112]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7E7A10016F0; Thu, 18 Feb 2021 04:14:10 +0000 (UTC) Date: Thu, 18 Feb 2021 12:14:07 +0800 From: Baoquan He To: Chen Zhou Subject: Re: [PATCH v14 04/11] x86: kdump: move xen_pv_domain() check and insert_resource() to setup_arch() Message-ID: <20210218041259.GG2871@MiWiFi-R3L-srv> References: <20210130071025.65258-1-chenzhou10@huawei.com> <20210130071025.65258-5-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210130071025.65258-5-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_231422_808519_3C1CD637 X-CRM114-Status: GOOD ( 21.57 ) 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: > We will make the functions reserve_crashkernel() as generic, the > xen_pv_domain() check in reserve_crashkernel() is relevant only to > x86, the same as insert_resource() in reserve_crashkernel[_low](). > So move xen_pv_domain() check and insert_resource() to setup_arch() > to keep them in x86. > > Suggested-by: Mike Rapoport > Signed-off-by: Chen Zhou > Tested-by: John Donnelly > --- > arch/x86/kernel/setup.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > index 086a04235be4..5d676efc32f6 100644 > --- a/arch/x86/kernel/setup.c > +++ b/arch/x86/kernel/setup.c > @@ -454,7 +454,6 @@ static int __init reserve_crashkernel_low(void) > > crashk_low_res.start = low_base; > crashk_low_res.end = low_base + low_size - 1; > - insert_resource(&iomem_resource, &crashk_low_res); > #endif > return 0; > } > @@ -478,11 +477,6 @@ static void __init reserve_crashkernel(void) > high = true; > } > > - if (xen_pv_domain()) { > - pr_info("Ignoring crashkernel for a Xen PV domain\n"); > - return; > - } > - > /* 0 means: find the address automatically */ > if (!crash_base) { > /* > @@ -529,7 +523,6 @@ static void __init reserve_crashkernel(void) > > crashk_res.start = crash_base; > crashk_res.end = crash_base + crash_size - 1; > - insert_resource(&iomem_resource, &crashk_res); > } > #else > static void __init reserve_crashkernel(void) > @@ -1151,7 +1144,17 @@ void __init setup_arch(char **cmdline_p) > * Reserve memory for crash kernel after SRAT is parsed so that it > * won't consume hotpluggable memory. > */ > - reserve_crashkernel(); > + if (xen_pv_domain()) > + pr_info("Ignoring crashkernel for a Xen PV domain\n"); > + else { > + reserve_crashkernel(); > +#ifdef CONFIG_KEXEC_CORE > + if (crashk_res.end > crashk_res.start) > + insert_resource(&iomem_resource, &crashk_res); > + if (crashk_low_res.end > crashk_low_res.start) > + insert_resource(&iomem_resource, &crashk_low_res); > +#endif Acked-by: Baoquan He > + } > > memblock_find_dma_reserve(); > > -- > 2.20.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel