From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15E2AC433E0 for ; Tue, 26 Jan 2021 07:07:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8AB0E206FA for ; Tue, 26 Jan 2021 07:07:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AB0E206FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0F1E58D00A1; Tue, 26 Jan 2021 02:07:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A09A8D0076; Tue, 26 Jan 2021 02:07:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF8418D00A1; Tue, 26 Jan 2021 02:07:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0108.hostedemail.com [216.40.44.108]) by kanga.kvack.org (Postfix) with ESMTP id D6D958D0076 for ; Tue, 26 Jan 2021 02:07:35 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 93745181AEF1E for ; Tue, 26 Jan 2021 07:07:35 +0000 (UTC) X-FDA: 77747045670.04.mint87_3b036372758c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 796AA800CE7B for ; Tue, 26 Jan 2021 07:07:35 +0000 (UTC) X-HE-Tag: mint87_3b036372758c X-Filterd-Recvd-Size: 5881 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 26 Jan 2021 07:07:34 +0000 (UTC) Received: by mail-lj1-f182.google.com with SMTP id a25so17187462ljn.0 for ; Mon, 25 Jan 2021 23:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kZn4RLcS22zFx/2DTlAuwltfIUf6VsTelsb0t+E6OVU=; b=pE8xWIBoOLny7oXqvXpMfoJi7JvpcpxmDh8zm4lh6Uyvr7b7j2jJ7UZOS+MLQo/FQl ubWzJy4Q9s96T7Xf5E4zjvCYdacNMNyt+STvwNBvFn+DFbK1IOa45QTNx0CK4tqt2MpE 9q6lIDbdd6oVcqVQ0kyJ3m+Pa4KmXb/GEkNs+DukdguxZPCCldWwxVUSFHBQY8TTXzaw r84fbwLTu2moq87yE0Jn9wp0/Z/tqpyc8iNyG3SkbdlThnz5e02C5xiKzbm9LVhu0+50 1mKgeNkq8I0jWJozi9klT6Xk9zf53USHbrk6wyKE2duKkRFShkvcooM40NT48zxOfIeg CSEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kZn4RLcS22zFx/2DTlAuwltfIUf6VsTelsb0t+E6OVU=; b=aZEVBc3qTR8vzpmaYTEFjc5N2NAYVH/n8iHIUVOH1vcgsPQK/OAsGs35jSOjpK5Epp KlFLfPN0o4W9S9wCamKK8SEFAMDHhXNsZwYFNUTrnanjy5B2h7/Cs0DJQ/SLDlsQ7N4Z UUhpHn+2i+wbMNv+yOUCmDgornl9PMs0zyMt0bwqyF6S+WKiwWmm+Wcm1DMz1liaNjH7 ilpJ35p/PKq8j/0za7Q++Bd/HCw36KCDqp97grvpZUsXK3u7klBwwg/kk5HqJkjUsxwf c0cFv3ZOqx0qo5v/TYuyawe25XR1u8aZsosxT3HBRufP4QARamlrxx6HMlZbgrkW440N S5uw== X-Gm-Message-State: AOAM533ElUoDwcIoImHGHa1kJwyLvNtR9yxZwKbo00nw/YyrgA2CJT7t 1wP9o3qtkRp3amm9GO160YhMeUMzeJ7fcqR+4U/5mA== X-Google-Smtp-Source: ABdhPJwPrhIKzj8GZZNZJ8aPtOX3sEhjLT4uJM9gyulJIyHIGvl4KbrgVs2kwfOBdPjMvdI2rfwpFkVem0QwXxEa/PE= X-Received: by 2002:a2e:a554:: with SMTP id e20mr2151530ljn.128.1611644853468; Mon, 25 Jan 2021 23:07:33 -0800 (PST) MIME-Version: 1.0 References: <20210121175502.274391-1-minchan@kernel.org> <20210121175502.274391-4-minchan@kernel.org> In-Reply-To: <20210121175502.274391-4-minchan@kernel.org> From: John Stultz Date: Mon, 25 Jan 2021 23:07:21 -0800 Message-ID: Subject: Re: [PATCH v4 3/4] dt-bindings: reserved-memory: Make DMA-BUF CMA heap DT-configurable To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Hyesoo Yu , david@redhat.com, Michal Hocko , Suren Baghdasaryan , KyongHo Cho , John Dias , Hridya Valsaraju , Sumit Semwal , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Christoph Hellwig , Rob Herring , "moderated list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jan 21, 2021 at 9:55 AM Minchan Kim wrote: > .../reserved-memory/dma_heap_chunk.yaml | 56 +++++++++++++++++++ > 1 file changed, 56 insertions(+) > create mode 100644 Documentation/devicetree/bindings/reserved-memory/dma_heap_chunk.yaml > > diff --git a/Documentation/devicetree/bindings/reserved-memory/dma_heap_chunk.yaml b/Documentation/devicetree/bindings/reserved-memory/dma_heap_chunk.yaml > new file mode 100644 > index 000000000000..00db0ae6af61 > --- /dev/null > +++ b/Documentation/devicetree/bindings/reserved-memory/dma_heap_chunk.yaml > @@ -0,0 +1,56 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/reserved-memory/dma_heap_chunk.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Device tree binding for chunk heap on DMA HEAP FRAMEWORK > + > +description: | > + The DMA chunk heap is backed by the Contiguous Memory Allocator (CMA) and > + supports bulk allocation of fixed size pages. > + > +maintainers: > + - Hyesoo Yu > + - John Stultz > + - Minchan Kim > + - Hridya Valsaraju > + > + > +properties: > + compatible: > + enum: > + - dma_heap,chunk > + > + chunk-order: > + description: | > + order of pages that will get allocated from the chunk DMA heap. > + maxItems: 1 > + > + size: > + maxItems: 1 > + > + alignment: > + maxItems: 1 > + > +required: > + - compatible > + - size > + - alignment > + - chunk-order > + > +additionalProperties: false > + > +examples: > + - | > + reserved-memory { > + #address-cells = <2>; > + #size-cells = <1>; > + > + chunk_memory: chunk_memory { > + compatible = "dma_heap,chunk"; > + size = <0x3000000>; Hey Minchan, Looking closer here, would it make more sense to document the "reg = <>" parameter here as well instead of just "size = <>"? That way the address of the region could be explicitly specified (for instance, to ensure the CMA region created is 32bit addressable). And more practically, trying to satisfy the base address alignment checks in the final patch when its set dynamically may require a fair amount of luck - I couldn't manage it in my own testing on the hikey960 w/o resorting to reg= :) It does look like the RESERVEDMEM_OF_DECLARE() logic already supports this, so it's likely just a matter of documenting it here? thanks -john