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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ADD7C433EF for ; Sat, 7 May 2022 01:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391216AbiEGBrC (ORCPT ); Fri, 6 May 2022 21:47:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389810AbiEGBrB (ORCPT ); Fri, 6 May 2022 21:47:01 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7841059306; Fri, 6 May 2022 18:43:16 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kw99m3bnczGpT7; Sat, 7 May 2022 09:40:28 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 7 May 2022 09:42:45 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 7 May 2022 09:42:44 +0800 Subject: Re: [PATCH v24 5/6] of: Support more than one crash kernel regions for kexec -s To: Baoquan He CC: Thomas Gleixner , Ingo Molnar , Borislav Petkov , , "H . Peter Anvin" , , Dave Young , Vivek Goyal , Eric Biederman , , Catalin Marinas , Will Deacon , , Rob Herring , Frank Rowand , , "Jonathan Corbet" , , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , "John Donnelly" , Dave Kleikamp References: <20220506114402.365-1-thunder.leizhen@huawei.com> <20220506114402.365-6-thunder.leizhen@huawei.com> <20220506231737.GD122876@MiWiFi-R3L-srv> From: "Leizhen (ThunderTown)" Message-ID: <55e201f1-f136-607c-78f8-eb4ec481909e@huawei.com> Date: Sat, 7 May 2022 09:42:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20220506231737.GD122876@MiWiFi-R3L-srv> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org 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. > > 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