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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 59402C6FA82 for ; Wed, 7 Sep 2022 12:45:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.401595.643455 (Exim 4.92) (envelope-from ) id 1oVuQX-0003tR-Tn; Wed, 07 Sep 2022 12:45:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 401595.643455; Wed, 07 Sep 2022 12:45:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVuQX-0003tK-QA; Wed, 07 Sep 2022 12:45:09 +0000 Received: by outflank-mailman (input) for mailman id 401595; Wed, 07 Sep 2022 12:45:08 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVuQW-0003tE-N2 for xen-devel@lists.xenproject.org; Wed, 07 Sep 2022 12:45:08 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oVuQW-0005TI-Aa; Wed, 07 Sep 2022 12:45:08 +0000 Received: from 54-240-197-233.amazon.com ([54.240.197.233] helo=[192.168.17.46]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oVuQW-0001Ii-35; Wed, 07 Sep 2022 12:45:08 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=jCSVVoXzJNRatYYuCyZFpFduunPJBxmvHk/rbbyryxU=; b=g0r9l+NmWrsO/Kdcvd7SnDXMr0 961ZGwXH7HKJsFLN2Ln/HniEPOv7NLMmPGoIFGcQmwMHFvehsFEksrVvVvv/1/jOiyGCSf67BcFJj C9E34CudNLvTH1WEGBlatS+xBlCCjs7DrjBSUSo1eMiicayc0R/TG9h2NsW4yXoWGoLk=; Message-ID: Date: Wed, 7 Sep 2022 13:45:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v3 2/4] docs, xen/arm: Introduce static heap memory Content-Language: en-US To: Michal Orzel , Henry Wang , xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Bertrand Marquis , Wei Chen , Volodymyr Babchuk , Penny Zheng References: <20220907083643.20152-1-Henry.Wang@arm.com> <20220907083643.20152-3-Henry.Wang@arm.com> <968529ba-3a9d-0812-1a5f-430d467e827f@xen.org> <9a66b6df-bc37-d836-8175-3b98be07c696@amd.com> From: Julien Grall In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 07/09/2022 13:41, Michal Orzel wrote: > > > On 07/09/2022 14:32, Julien Grall wrote: >> [CAUTION: External Email] >> >> On 07/09/2022 13:12, Michal Orzel wrote: >>> Hi Julien, >> >> Hi Michal, >> >>> On 07/09/2022 13:36, Julien Grall wrote: >>>> >>>> Hi Henry, >>>> >>>> While reviewing the binding sent by Penny I noticed some inconsistency >>>> with the one you introduced. See below. >>>> >>>> On 07/09/2022 09:36, Henry Wang wrote: >>>>> +- xen,static-heap >>>>> + >>>>> + Property under the top-level "chosen" node. It specifies the address >>>>> + and size of Xen static heap memory. Note that at least a 64KB >>>>> + alignment is required. >>>>> + >>>>> +- #xen,static-heap-address-cells and #xen,static-heap-size-cells >>>>> + >>>>> + Specify the number of cells used for the address and size of the >>>>> + "xen,static-heap" property under "chosen". >>>>> + >>>>> +Below is an example on how to specify the static heap in device tree: >>>>> + >>>>> + / { >>>>> + chosen { >>>>> + #xen,static-heap-address-cells = <0x2>; >>>>> + #xen,static-heap-size-cells = <0x2>; >>>> >>>> Your binding, is introduce #xen,static-heap-{address, size}-cells >>>> whereas Penny's one is using #{address, size}-cells even if the property >>>> is not "reg". >>>> >>>> I would like some consistency in the way we define bindings. Looking at >>>> the tree, we already seem to have introduced >>>> #xen-static-mem-address-cells. So maybe we should follow your approach? >>>> >>>> That said, I am wondering whether we should just use one set of property >>>> name. >>>> >>>> I am open to suggestion here. My only request is we are consistent (i.e. >>>> this doesn't depend on who wrote the bindings). >>>> >>> In my opinion we should follow the device tree specification which states >>> that the #address-cells and #size-cells correspond to the reg property. >> >> Hmmm.... Looking at [1], the two properties are not exclusive to 'reg' >> Furthermore, I am not aware of any restriction for us to re-use them. Do >> you have a pointer? > > As we are discussing re-usage of #address-cells and #size-cells for custom properties that are not "reg", > I took this info from the latest device tree specs found under https://www.devicetree.org/specifications/: > "The #address-cells property defines the number of cells used to encode the address field in a child node's reg property" > and > "The #size-cells property defines the number of cells used to encode the size field in a child node’s reg property" Right. But there is nothing in the wording suggesting that #address-cells and #size-cells can't be re-used. From [1], it is clear that the meaning has changed. So why can't we do the same? Cheers, -- Julien Grall