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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8A0BC433F5 for ; Sat, 7 May 2022 02:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=JnTJ+EvPeRFN9ojnT1lwpJ/3hikuenhQGhN3OURt4p4=; b=bAc9DGu3JmRjkT SafLbTWOYx5jo9+PzJWCbPQ7oKFnt6eegamgqxkEnl21A3aiOSpmZhhwJRIWTFzk8hUPG++p8W+Wq cGvPMmzrgc4XX5RFHZDA64tD2h0SvCejFNBSRE/Z23UpjTgeTkGOg9myFxEb8mmAflpPsXStX3533 RMAXF7oHrCiRkNNWWI5oBuOA+vswbT4rz5aZ3lw7xff+26lRyYYII+IkDHRNDQHpMGdk3QaKMnSg/ pyDWEZS+DxgC/luI+/m+P+E7rxlCg2Lwo/k0yoUL2H+BrEepsE9hyvpHEL8Ad7HYzQSrZZX18QMYP CE/Sb6U3Rc5Vxymq1N7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnAJ5-005mHR-Di; Sat, 07 May 2022 02:36:31 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnAJ1-005mFd-7L for linux-arm-kernel@lists.infradead.org; Sat, 07 May 2022 02:36:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651890986; 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=xQzOPSWhtPUTGSpnflEE6jkGGkhhHHWuhrYd3CJyGAI=; b=hO3WxyRdot6nhKdXDQPDhAYVx5488ew8hsj9V+TeIoHhNr4EOnP7M0bcvgJ+CzSNXKiYbN SMYfI5HKQpKsIQQR5CAH1IWM77eA2Z/klZPsmwvQ9aH9LvqHUwrEpUo4L3m3iwJYMQEdMv x1Y0j7qf7Ebes1zGYd9MArCffh6mVTY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-142-vVK9huJtMPGbYuwP1K6bbw-1; Fri, 06 May 2022 22:36:15 -0400 X-MC-Unique: vVK9huJtMPGbYuwP1K6bbw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C83C329DD9A3; Sat, 7 May 2022 02:36:14 +0000 (UTC) Received: from localhost (ovpn-13-18.pek2.redhat.com [10.72.13.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A3F227AEB; Sat, 7 May 2022 02:36:10 +0000 (UTC) Date: Sat, 7 May 2022 10:36:06 +0800 From: Baoquan He To: "Leizhen (ThunderTown)" 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 , John Donnelly , Dave Kleikamp Subject: Re: [PATCH v24 5/6] of: Support more than one crash kernel regions for kexec -s Message-ID: References: <20220506114402.365-1-thunder.leizhen@huawei.com> <20220506114402.365-6-thunder.leizhen@huawei.com> <20220506231737.GD122876@MiWiFi-R3L-srv> <55e201f1-f136-607c-78f8-eb4ec481909e@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55e201f1-f136-607c-78f8-eb4ec481909e@huawei.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_193627_375534_223659A9 X-CRM114-Status: GOOD ( 24.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 05/07/22 at 09:42am, Leizhen (ThunderTown) wrote: > > > On 2022/5/7 7:17, Baoquan He wrote: > > On 05/06/22 at 07:44pm, Zhen Lei wrote: > >> When "crashkernel=X,high" is used, there may be two crash regions: > >> high=crashk_res and low=crashk_low_res. But now the syscall > >> kexec_file_load() only add crashk_res into "linux,usable-memory-range", > >> this may cause the second kernel to have no available dma memory. > >> > >> Fix it like kexec tool do for option -c, add both 'high' and 'low' regions > > ~~~~~~~~~~~~ > > kexec-tools does > > OK, I will update it. Thanks. Let's wait and see how Catalin considers. He may pick these with minor fix directly or your v25. > > > > > Other than this, LGTM, > > > > Acked-by: Baoquan He > > > >> into the dtb. > >> > >> Signed-off-by: Zhen Lei > >> Acked-by: Rob Herring > >> --- > >> drivers/of/kexec.c | 9 +++++++++ > >> 1 file changed, 9 insertions(+) > >> > >> diff --git a/drivers/of/kexec.c b/drivers/of/kexec.c > >> index b9bd1cff179388c..8d374cc552be5f2 100644 > >> --- a/drivers/of/kexec.c > >> +++ b/drivers/of/kexec.c > >> @@ -386,6 +386,15 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image, > >> crashk_res.end - crashk_res.start + 1); > >> if (ret) > >> goto out; > >> + > >> + if (crashk_low_res.end) { > >> + ret = fdt_appendprop_addrrange(fdt, 0, chosen_node, > >> + "linux,usable-memory-range", > >> + crashk_low_res.start, > >> + crashk_low_res.end - crashk_low_res.start + 1); > >> + if (ret) > >> + goto out; > >> + } > >> } > >> > >> /* add bootargs */ > >> -- > >> 2.25.1 > >> > > > > . > > > > -- > Regards, > Zhen Lei > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel