Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp664578ybm; Fri, 29 May 2020 09:13:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYXUDF6UB6ON5MbUZdqyxPyiH9dGnIWz6b1f8/yfvm4gs5lJriCWncTA9wl/40+tzcf8YV X-Received: by 2002:a17:906:5941:: with SMTP id g1mr8546679ejr.182.1590768805378; Fri, 29 May 2020 09:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590768805; cv=none; d=google.com; s=arc-20160816; b=oegnpRjIvYpkE6W+S7cE4ORx9+7PyTBzl4DWU2AYieuuJmKN+2ijuLoiEDMLqMn261 NJ1vO9YipElQCk0svnZner0qOyG7+3YkcH6gAvL39dAKq9Fl4A0ZFkLtUKe1VPHw2pBI 42oaoYZOgBq/e4rwsiwNWRHC09BfwphKqqX3XKOuiAA2ZoVv1bBJoXFmxdAYKqjSFJwd bdQPG/NSKiXlvUj4ScaRtXAHFwbDPt1qCc0TJwH95JNnABoppD6XSQoyzNf7cCwAAwIK aJmd0+BWJ9rZMSBewhtQiPCiQ81rcVlC06oqwMNloMSTEw/eSL8nUVtZ2Q5UJ1g1xwc/ X6ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GLEDP/tAbvaOwy1TeEcSVDtpm6mUBAYD0CmW1n6zt8w=; b=ENoPjQ88frXMKg7AOrTvA6l5OIclUXd9aE0E/o/Td+08xy3jrop1hOkKzODxivN/w3 hn8qweEaffaVCX6/8dioZmjUtH7uUnbQM+o3RmtMeJ8l2T2Oh3n8892qUUFU/rqiLCY5 KZrzvsd2Ze4Ja+lGJtfjf8uiGP8tssPLT+N52uflUdZ753XqicPWoDDsej3el5K/ChHW sq1vGmKhgAJzHItCZIdYJ/9BQRlAw1NQtlhZjR18xAD0r1GP+QSkeG18oE49Np0q1BfZ vxFgsdluOFT+YFC61ZWWLyE2u+BIYqyphKA8jlikK1tCrNS2l3XJwWYJ5jrHjtUYDQv6 669A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si5954206ejr.618.2020.05.29.09.13.01; Fri, 29 May 2020 09:13:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbgE2QLN (ORCPT + 99 others); Fri, 29 May 2020 12:11:13 -0400 Received: from foss.arm.com ([217.140.110.172]:38950 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE2QLM (ORCPT ); Fri, 29 May 2020 12:11:12 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56EAD55D; Fri, 29 May 2020 09:11:11 -0700 (PDT) Received: from [192.168.0.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB1183F718; Fri, 29 May 2020 09:11:08 -0700 (PDT) Subject: Re: [PATCH v8 5/5] dt-bindings: chosen: Document linux,low-memory-range for arm64 kdump To: Rob Herring , chenzhou 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 References: <20200521093805.64398-1-chenzhou10@huawei.com> <20200521093805.64398-6-chenzhou10@huawei.com> <20200526211800.GA352001@bogus> From: James Morse Message-ID: Date: Fri, 29 May 2020 17:11:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200526211800.GA352001@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, On 26/05/2020 22:18, Rob Herring wrote: > On Fri, May 22, 2020 at 11:24:11AM +0800, chenzhou wrote: >> 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. >>>> 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 >>>> +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. >> The comments from James: >> 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. Aha! I missed that. > 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. This first entry would need to be the 'crashkernel' range where the kdump kernel is placed, otherwise an older kernel won't boot. The rest can be optional extras, as long as we are tolerant of it being missing... I'll try and look at the rest of this series on Monday, Thanks, James