Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp963719ybz; Fri, 1 May 2020 11:45:01 -0700 (PDT) X-Google-Smtp-Source: APiQypKC6+ViZZKOQsMN+uqFVpeZM80Gg+Oqurdb4WY9WIK1c/ZM3J6U99pF7q6LArcs+K/hZLaf X-Received: by 2002:a50:f381:: with SMTP id g1mr4747758edm.219.1588358701125; Fri, 01 May 2020 11:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588358701; cv=none; d=google.com; s=arc-20160816; b=lvL9w97ZBlXQY6K6ZtmdHpTzzhBT64is/QY8/rUKUms+94YI5cWvB5aOBcAC+bBckH Iyb5pdODJ/1UFqwnOKQecDE3N4XxbD+SX12jnUALTS7t0Z5uyV++aSyZY0SqQ24WOvmn HJO8YP+zAjKXaAHSORBnuMqRzO6H+VSB5MzNRQsejNaH89Vj54wAvBqqnIUE4YivUIRs OJWKClCX006IPq+a+E3d1rz68K+6k3zYmaSO7HyIqc3tOHdjMsjtg48Nz+hd/J2ID8Sh ANnms6RLrJYBIsRPFkdF4NkjaaJLo4FrOjlucr/VNMWCRJz7YxEXpVGORv+85pZWuPWO C3Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=K/pyc9ZSgvlCPxWaLAF7Dj+DR/uYkULUKmz0lI2apjM=; b=SZcCLIFjr49lhXuizIwZAFHjQ8G+1+3cX8BMakQ7nOdxi4En5O+GvDwR+vaqwThXE9 N05pv8Dle1TT28S3pg11k/6IHZvejKu3fwCrgXdoddQa04aVOOQr5ui+FNNiwgPVkg6e KBpa8RW64IP0Gfcn9PasgB4owQb5xUpCfysDad9B4TL/7CE7IiUvzvzFbEzwo4vOpmp8 sg9dmMhb/qwA43mzxdi8e48KF60DjUMQxg2XwzyGU9m38ZVK5r9aOwdUcIa/nTGNufvI 3Qsmh3b6gObOZ7WOuwYpw2K/VDe6/0cRJ5zRPVvXNoVX7JeiESsWUJajIzXLnprMQih0 FEoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="i4V/eLGR"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si2394507edb.5.2020.05.01.11.44.36; Fri, 01 May 2020 11:45:01 -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; dkim=pass header.i=@linaro.org header.s=google header.b="i4V/eLGR"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730097AbgEASk3 (ORCPT + 99 others); Fri, 1 May 2020 14:40:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729721AbgEASk2 (ORCPT ); Fri, 1 May 2020 14:40:28 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58027C061A0C for ; Fri, 1 May 2020 11:40:28 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id z17so3298483oto.4 for ; Fri, 01 May 2020 11:40:28 -0700 (PDT) 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=K/pyc9ZSgvlCPxWaLAF7Dj+DR/uYkULUKmz0lI2apjM=; b=i4V/eLGRRDB/t5gS34y6x6FmiullhpKMPXQe+E4ih2swc8cRlFluseSUU+ZBlGBsVx 61I7Slgf9kEu2+57x9aRxp2pbshiXeln7PzqLgZ8StlqgrETFcszmRQc2uLXVEMteQ6K WsYkV5FgsGL/gaiLMtLVGEpi+XxrbCiGTar5uBAafBCi4QpOfA9Ni7juUOMrqIhbSw7o dZS3eNr/bYB9rwBwJ2jIOGXujjaVcW3kUbQSmah72Fi3rxxcPKtEKdeb09cydPN0RUkH fI/cGT05sjeH8Cg+EjNafozZoyY1nh057jxvYMba1UKDryTI5OjZu/ptlgnjY6feBp+0 805A== 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=K/pyc9ZSgvlCPxWaLAF7Dj+DR/uYkULUKmz0lI2apjM=; b=A5flhEu9bLPvitdAPxp6bpHNAAoZa/drVMgDCr157PxqVz02b73BGqu+WCmc2gXJPV YuqAbIi55E2WrLYog133LTLLu0yQJcpsAac39nOYrM7nBY3K0maLYvs1Fu0U8LarToZn oJQTAVvDsqUOEI2aLzyEmeJ4OpwGvNbKH9/tOLYfTG+UgTTItR5rVNWo1rvnfBkes9mL eSzVCahwj5UjspUztEo93slECqeCy7opi8Bkkv8LRyLUcJlBxXdvNzNn0+57wZ5a50Xz 5drpwBzwgmL0gHBqcFek+CBYMk7s93H62do6Loej55ueT9gkD8tQ8sLS3jQ7n98jYoId cj3Q== X-Gm-Message-State: AGi0PuajFqcZMU9oopGuz7K5YQZDHw9XfrxzHF1WtYCFYjoY6C1g5EIF rW/ooU0p1q/eDdlmHiiMmX4YAraI+xwBrtTvPevUw/gP X-Received: by 2002:a05:6830:1589:: with SMTP id i9mr4941206otr.102.1588358427674; Fri, 01 May 2020 11:40:27 -0700 (PDT) MIME-Version: 1.0 References: <20200501073949.120396-1-john.stultz@linaro.org> <20200501073949.120396-2-john.stultz@linaro.org> <20200501104216.4f226c2a7bzval5o@DESKTOP-E1NTVVP.localdomain> In-Reply-To: <20200501104216.4f226c2a7bzval5o@DESKTOP-E1NTVVP.localdomain> From: John Stultz Date: Fri, 1 May 2020 11:40:16 -0700 Message-ID: Subject: Re: [RFC][PATCH 1/4] devicetree: bindings: Add linux,cma-heap tag for reserved memory To: Brian Starkey Cc: lkml , Rob Herring , Sumit Semwal , "Andrew F. Davis" , Benjamin Gaignard , Liam Mark , Pratik Patel , Laura Abbott , Chenbo Feng , Alistair Strachan , Sandeep Patil , Hridya Valsaraju , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Andrew Morton , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , dri-devel , linux-mm , nd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 1, 2020 at 3:42 AM Brian Starkey wrote: > > Hi, > > On Fri, May 01, 2020 at 07:39:46AM +0000, John Stultz wrote: > > This patch adds a linux,cma-heap property for CMA reserved memory > > regions, which will be used to allow the region to be exposed via > > the DMA-BUF Heaps interface > > > > Cc: Rob Herring > > Cc: Sumit Semwal > > Cc: "Andrew F. Davis" > > Cc: Benjamin Gaignard > > Cc: Liam Mark > > Cc: Pratik Patel > > Cc: Laura Abbott > > Cc: Brian Starkey > > Cc: Chenbo Feng > > Cc: Alistair Strachan > > Cc: Sandeep Patil > > Cc: Hridya Valsaraju > > Cc: Christoph Hellwig > > Cc: Marek Szyprowski > > Cc: Robin Murphy > > Cc: Andrew Morton > > Cc: devicetree@vger.kernel.org > > Cc: dri-devel@lists.freedesktop.org > > Cc: linux-mm@kvack.org > > Signed-off-by: John Stultz > > --- > > .../devicetree/bindings/reserved-memory/reserved-memory.txt | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt > > index bac4afa3b197..e97b6a4c3bc0 100644 > > --- a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt > > +++ b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt > > @@ -68,6 +68,9 @@ Linux implementation note: > > - If a "linux,cma-default" property is present, then Linux will use the > > region for the default pool of the contiguous memory allocator. > > > > +- If a "linux,cma-heap" property is present, then Linux will expose the > > + the CMA region via the DMA-BUF Heaps interface. > > + > > Would it be useful or even possible to give some indication of what > the heap will end up being called? I'm afraid I don't remember what if > any conclusions came out of previous discussions on UAPI for heap > enumeration. So the name we expose is the CMA name itself. So with dt it will be the name of the reserved memory node that the flag property is added to. > I suppose CMA names haven't been relevant to userspace before, but > they perhaps would be with this change. > > Alternatively, leaving it effectively undefined doesn't tie us down, > and something like links in sysfs can be added as a richer API in the > future. Hrm. Mind expanding on what you're thinking here? thanks -john