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 6D9E2C433F5 for ; Sat, 7 May 2022 01:44:57 +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:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Xm+XLAYSM5tehUFpcdUzZbiXMBobIjIR/jgp7nUcoFw=; b=hpPJh9NGlPJciTuOy83h1YZMvF cAIgw+ErTdGX8aJvS2YcoWz/NaSQght5bRLVN/unNaJMvXkUJb1md6p+zYvEFtSlYztV1MNNlTVSf M7tZm5IE0u985S5xC4F25JOKC0hnOubqAWDIEJeHRsvmUQg0o5jnJIyYfO3uNM+lnUl4jrIY8YZyD fDgOhkMI4FM41TB1uTqjXN2xnYkEOP3xq8QX/nB3LXNw8GrKv09KoeNt/LtbqMlVK3QN5nO31xmwp rnaiCCEu8aqBmjNQEjVZ+VwmFtauu4c8FibXW4i6ghYsHaEm2+h57Gh8NptqSJeLSQG/zigVXX5kW oaHoSbRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nn9Th-005eVj-Fz; Sat, 07 May 2022 01:43:25 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nn9Tc-005eSo-9v; Sat, 07 May 2022 01:43:21 +0000 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-Language: en-US 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_184320_538045_6EE4BEE2 X-CRM114-Status: GOOD ( 15.86 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel