Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4697793iob; Sun, 8 May 2022 22:24:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbXw8+wpiIMhzSgpa9vbFpA4aYrmckg6e/I4ryDK+aI3XL7z8+Nw/LTGMJYzwwJBTos/Ny X-Received: by 2002:a17:90b:1894:b0:1dc:1028:aecb with SMTP id mn20-20020a17090b189400b001dc1028aecbmr24259950pjb.106.1652073899509; Sun, 08 May 2022 22:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652073899; cv=none; d=google.com; s=arc-20160816; b=bvEZJQ7/zj9ZDhgp46nncMlWm2qn+lLwlzODyw3hP5mZq+z7l4MmsY46ZV+WmgIn4K DCweJI/If3xoAseSB38q2s18ClzLLALETp8YeCkQXEY4Aerxop/dPM7YoYeLAxZIn3vz 3uLajs24twuj8sHiZ+1QcLiJZ2VglfWIiQHiWSHh38zcca1r2puJfMCFhXRQ8bjIY5D7 O1IFOfrOoJckRV50AAY9jF1+oFuD/vW5shu3+LIgapdG6KjzsYlKcJXQynByQDeMpqn8 aNIA1+Fhjbr/iIZU+FazyHQCJLpJeKIDO5kqKzJndqqnTLmbEvWeoZNnHLS3ZBYrYIgU dtcQ== 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=wslZBJewjz4hJp3e76dVIXzGvwXKoz3kxZZ5099+eDo=; b=Tz81DsyZAwAAnS14r6ObWPXxsQDn9he1b1N5iwA3PDKdytaaltqPQltyRL6oa/dNoK 1DLu42uprc7UGEktwL7iuIYsQGPeCaco+hmO4ghsCuY+kSg3PaHJtfnw/J4Hzq05nmSs N9RkIsqrQbkRPBieLS2u7ePsX+iWn6ElCJPEBpDJgu4cHYLC2zz5mjtcLHtCMAQDOP6c WsaT4dXr5D9+YlxCpEms1G7rBGv4sVWd6DmEUr44g110otSvobfe2jl6UYUdc4DWlNP2 pQapYcWXN8IhOld9R7m/4Mj7duynpl497NFSbORh7KukamWtGrBgHANpTCL631Lxjtxh DltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VmlSAAgM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n15-20020a17090a670f00b001c613fa106asi11991240pjj.163.2022.05.08.22.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 22:24:59 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VmlSAAgM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 80158FD356; Sun, 8 May 2022 22:21:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443605AbiEFXVk (ORCPT + 99 others); Fri, 6 May 2022 19:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377390AbiEFXVi (ORCPT ); Fri, 6 May 2022 19:21:38 -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 6C6B07090B for ; Fri, 6 May 2022 16:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651879073; 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=wslZBJewjz4hJp3e76dVIXzGvwXKoz3kxZZ5099+eDo=; b=VmlSAAgMx/TvLnE50b3C5wWKZ1Jyq6VPr78DDJvsv95VeCeXS/P2MypkW2E95x6WI3bkLV i1UmIJAyzMxkSFqdSCwCf+h7Cj9onDjJ61FJSxkbFqGybp7St85IYxOxY1zemOIhrgbWY2 Xy7WDI2sHcwIHPEN8ephZWFT/NfCr1I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-106-RR9lHokKPZuzyx5pu4Jd9Q-1; Fri, 06 May 2022 19:17:46 -0400 X-MC-Unique: RR9lHokKPZuzyx5pu4Jd9Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 342FF101AA45; Fri, 6 May 2022 23:17:45 +0000 (UTC) Received: from localhost (ovpn-12-33.pek2.redhat.com [10.72.12.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A3BE2026614; Fri, 6 May 2022 23:17:41 +0000 (UTC) Date: Sat, 7 May 2022 07:17:37 +0800 From: Baoquan He To: Zhen Lei 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: <20220506231737.GD122876@MiWiFi-R3L-srv> References: <20220506114402.365-1-thunder.leizhen@huawei.com> <20220506114402.365-6-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220506114402.365-6-thunder.leizhen@huawei.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_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/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 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 >