Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp397126ybm; Tue, 26 May 2020 20:53:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5ZKmshFe7HzFI3p0VfnHFXlzkFdW/ABFffA5QEPkXqJcS+OBEk4KJeSU1wd+WpmyJytno X-Received: by 2002:a17:906:2e9a:: with SMTP id o26mr2663638eji.538.1590551623809; Tue, 26 May 2020 20:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590551623; cv=none; d=google.com; s=arc-20160816; b=iulXYr3B0sAW/h/stTdU1Y3co0xU6CXSB+gdKBEzGSqBF1P3JsPtMAFm6mirF8gJ7R Gflq2HJE/y1YHoH3iPUmoZA2ELJTYDC0GJHNl4BxV5vWlJ2Ipkvz+GfS3Wm9OmYj0KFr Td8SbqdmridpuntE2lLBoxl1lgK6VMnIVto9vJ6A39Z7xCANiTPr4qgaeelKN+FRpYV/ vYJC9kuJyqXQgp9QekZFCoyBNIVnec43kXKMed4hPjO1bnsRASZk00cmuDNm/XIcLwZY MHT1xhUspu3XkR8FvQ1oCpVBZCVSNzItkNzfY0hKNRFroMwLQx/r+HnmnE8PDvJdRwzn n2dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lVVBuWO3qFEQRVDuoZfe9DGQFjStmCr4atb2ZbHcO8E=; b=LaeMtWvLCvfq7eG932tmF1yXvbLJbbRQEyq2eUelV+XuK69BVJf9fk7A76HctixHaI WiysSjnO7bmC8B/7ECXaUmQeGGe/k6RPPQup6LfcsS3UyMAlyqfH7uAMWXfaLl/FjU1f OC2YMzxcrB783DQw9vUjK14bGhz9NmLpkFjXZohoEZt2yu0d7rFvNOS+SPbrL1VA5krG BjFl2oJ5pL/k45eogJ3o01bRI/y01rUpxORGQ8B1+5MjM/Oij9U+7yd0NsFbT9/qExv7 uPsZuF6Nzh+BaS4S1uWz5gwEh0O0J0j24/TC5T3A5CfR3nbDMSCcVI6KCzkbr9TiyBDC K70A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si1083930edy.21.2020.05.26.20.53.20; Tue, 26 May 2020 20:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390922AbgEZVSE (ORCPT + 99 others); Tue, 26 May 2020 17:18:04 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:34773 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390009AbgEZVSD (ORCPT ); Tue, 26 May 2020 17:18:03 -0400 Received: by mail-io1-f65.google.com with SMTP id f3so23717703ioj.1; Tue, 26 May 2020 14:18:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lVVBuWO3qFEQRVDuoZfe9DGQFjStmCr4atb2ZbHcO8E=; b=AeIMKfN+5/n35HclKzNcOmYZEHwr4aO5D22NgPTX0dZZd3IZA0o3V4+sWavKqjj4n+ v3NSl4Q84NKqB08tflrt19o816L5AD26NDl+tjY3+N6dAZbA9LVDk0KAjHgWfiedF11e ig0FZTMLuDQb3VRw7mU18Lyip2Jyq4Exct58ZW5aEW+HsKq2GfuiIXg+JzmaRV0kZAJh MD5zlWqs+SEx4jEBMftjR61OD238wRcAkvrKAx2Uk1QgmkXjB5CgAoShKksVfdMLzkfl k31uLOlKxklTS804TuUCRhPy0TuhnalUSyWkarIjG869Bn9IjOe9JM/ka1Rsv9qpqVfD 494g== X-Gm-Message-State: AOAM532CMPu0zXjNXOKQe3C3Wzy7TC0CdFk1Y+1Vim29E74DnRcs9UaC DvghuHL8BfBi9WVfFNHPZA== X-Received: by 2002:a6b:7017:: with SMTP id l23mr4256428ioc.140.1590527882382; Tue, 26 May 2020 14:18:02 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id x22sm567394ill.9.2020.05.26.14.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 14:18:01 -0700 (PDT) Received: (nullmailer pid 389955 invoked by uid 1000); Tue, 26 May 2020 21:18:00 -0000 Date: Tue, 26 May 2020 15:18:00 -0600 From: Rob Herring To: chenzhou , James Morse Cc: Thomas Gleixner , Ingo Molnar , Catalin Marinas , Will Deacon , dyoung@redhat.com, Baoquan He , Arnd Bergmann , John.p.donnelly@oracle.com, pkushwaha@marvell.com, Simon Horman , Hanjun Guo , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , devicetree@vger.kernel.org, Linux Doc Mailing List , "linux-kernel@vger.kernel.org" , kexec@lists.infradead.org Subject: Re: [PATCH v8 5/5] dt-bindings: chosen: Document linux,low-memory-range for arm64 kdump Message-ID: <20200526211800.GA352001@bogus> References: <20200521093805.64398-1-chenzhou10@huawei.com> <20200521093805.64398-6-chenzhou10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 11:24:11AM +0800, chenzhou wrote: > Hi Rob, +James M (It's nice to Cc folks if you mention/quote them) > On 2020/5/21 21:29, Rob Herring wrote: > > On Thu, May 21, 2020 at 3:35 AM Chen Zhou wrote: > >> Add documentation for DT property used by arm64 kdump: > >> linux,low-memory-range. > >> "linux,low-memory-range" is an another memory region used for crash > >> dump kernel devices. > >> > >> Signed-off-by: Chen Zhou > >> --- > >> Documentation/devicetree/bindings/chosen.txt | 25 ++++++++++++++++++++ > >> 1 file changed, 25 insertions(+) > > chosen is now a schema documented here[1]. > Ok, that is, i don't need to modify the doc in kernel, just create a pull request in github [1]? > > > > >> diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt > >> index 45e79172a646..bfe6fb6976e6 100644 > >> --- a/Documentation/devicetree/bindings/chosen.txt > >> +++ b/Documentation/devicetree/bindings/chosen.txt > >> @@ -103,6 +103,31 @@ While this property does not represent a real hardware, the address > >> and the size are expressed in #address-cells and #size-cells, > >> respectively, of the root node. > >> > >> +linux,low-memory-range > >> +---------------------- > >> +This property (arm64 only) holds a base address and size, describing a > >> +limited region below 4G. Similar to "linux,usable-memory-range", it is > >> +an another memory range which may be considered available for use by the > >> +kernel. > > Why can't you just add a range to "linux,usable-memory-range"? It > > shouldn't be hard to figure out which part is below 4G. > I did like this in my previous version, such as v5. After discussed with James, i modified it to the current way. > > We think the existing behavior should be unchanged, which helps with keeping compatibility with existing > user-space and older kdump kernels. > > The comments from James: > > linux,usable-memory-range = . > Won't this break if your kdump kernel doesn't know what the extra parameters are? > Or if it expects two ranges, but only gets one? These DT properties should be treated as > ABI between kernel versions, we can't really change it like this. > > I think the 'low' region is an optional-extra, that is never mapped by the first kernel. I > think the simplest thing to do is to add an 'linux,low-memory-range' that we > memblock_add() after memblock_cap_memory_range() has been called. > If its missing, or the new kernel doesn't know what its for, everything keeps working. I don't think there's a compatibility issue here though. The current kernel doesn't care if the property is longer than 1 base+size. It only checks if the size is less than 1 base+size. And yes, we can rely on that implementation detail. It's only an ABI if an existing user notices. Now, if the low memory is listed first, then an older kdump kernel would get a different memory range. If that's a problem, then define that low memory goes last. Rob