Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3739275iob; Sat, 7 May 2022 13:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFP5x56tQpjcsBGZO1KPrwNtqiGCkCt2vOodwsueAS4JLlim9/hERKnwr+OAjBXPTvSkVn X-Received: by 2002:a05:6402:1d4c:b0:427:d1f5:3a41 with SMTP id dz12-20020a0564021d4c00b00427d1f53a41mr9805567edb.218.1651955845284; Sat, 07 May 2022 13:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651955845; cv=none; d=google.com; s=arc-20160816; b=tfbV2Pbh4CcRc14d8tRs1X2qLnCBFdVVO9+16aUj6mkea2J1mhwjzQVLVqNApXjLe8 YCD8G4FjCg4gFWDS/8S4ylJPWjpfeiSCanvafM0vk5T36opH0GKbCfhTVpGlzo4WHpJg f39Mc/tEhDiJKAGAFGDjnNKX8Hd8gMludp92oT4+wnsYwAFIUiunHuW3Qh3NwSiD00lC YB6wsmdl+SkEWJ29BIibK47m7Q13CnDwcTEo9pttx9F0cCmORfOKRenxM6elDqPximuO ClWZD7n+axaBs7RgeVXhuQWZO1ImpI+DUlAuey2/ZO7oN9yyLRp4CLA37Q4qYXvtdFmb EciQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xQzOPSWhtPUTGSpnflEE6jkGGkhhHHWuhrYd3CJyGAI=; b=MKXMAHPKfu0J/fLDlzezjjsZzZ95bm9vw7/tZPbT7uHM1Yp3puKAjUbAoczW0zLnbj HrnV0HUXLDE8lMdVyTO0jqM1nxqOuCtcM0KGyCQjQYfEB+D9ytZLpA7o1BP/9njp6H5v b9JdTNiMlAGVJykN0X/YwaeQ6knVVpxtryUyV+DdY7QgMx7S2ERn2l6a6jUT2E/RqdsQ XopWjOq2LU113hAOCvGd63QAbCem1dfftFcHMAF2+Nyj5hJXGqzFMTdP15Y97l/3kvg3 Jl17Q6OjcglK0nh12bJyOJbm0N5fiaqTf6j8e5ZF+8HvL9yh9867vDp+70OdZ9Dm9UHj lbAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HozoLmjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a508d07000000b00427f396809fsi7822531eds.606.2022.05.07.13.37.02; Sat, 07 May 2022 13:37:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HozoLmjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445378AbiEGCkP (ORCPT + 99 others); Fri, 6 May 2022 22:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356739AbiEGCkI (ORCPT ); Fri, 6 May 2022 22:40:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3711A6AA6A for ; Fri, 6 May 2022 19:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651890983; 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=HozoLmjgJrKGPTe9AVXqpjsM+xtxSh/88aX8vFysUA2DNJb357tIgqMnT3I4G4bnofTDCq kmqVfpiJxUDhaxFTQj5gkKj7+2GSqp+qrjoCyYK5qMPSWVzVi4YNbXCV1TZFevaegoNpsG /H0FvPluDa+gG+5Sd6zL1CXmlUqrQzU= 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-Type: text/plain; charset=us-ascii 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-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >