Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp2040089ybj; Wed, 6 May 2020 09:32:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKIzKraZhbqXa0i+FyJnz4AgoKzkCs4XgbnGbY1u86Ni+rFDtwA+wxsXDRtNVQ/sKCELAbs X-Received: by 2002:a50:e806:: with SMTP id e6mr8064033edn.153.1588782751560; Wed, 06 May 2020 09:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588782751; cv=none; d=google.com; s=arc-20160816; b=W9Rfk2IkoluosRSqvFiSno6l61QS0vpvT0rEC7MRUTwShkttxfJFSK0+cU44WzdThe wXgLI0pScMnJWJeJcdhkjCuhwslE3cfPAEISLV95+jrcukY3ebVewVphbkBael26eUK8 z/RSc9wVOKW+/ToMmJm35sxMTFdPYklbl0V5rAsoOnmQikvdzOsh7Kf+jWo8nVR7yCGb MvY2CR5KrnVLGzXKMZdy/bEZA9dEoQEOz1RarnBL3UtRsbHfbcUVnhbYJOfd2QN+oIxf xXpxQVssFW5H7FmTUpGAvlcieSLFkDzDvCMF60YvWQsIWFgf+iQTEke0u84+nUCbbu33 ywZQ== 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=EvHPxE7L1Cb6oif98tDAWFYOvy9QzwI+EVnlaf1jpTo=; b=JrNuZy041UzPOfb/i4wE+xC00gbOs6tCFfJrt7qv1LBe4wRycjvvtG6dV7XyMNthPy JKWMhfyN+DfSDLg3o4TD/jZ2PwuJW2oZDKKGoYm+bbqPhGq92yWJ5X+sHw6AI9GhdPxp O6Hdm1k35vS11302bumSv5DvTRD+BzMxEolcGyYTYVAZLxBz9hb1uu2yXhGPuf44fEg4 kRzGg2A42ro89kfuAvDFNbgY8c7ytc3TXvUC+/IwQPbXkGD2HLORmDho4Dps3BNf12Zf hdI2MinnIIBWyfWqEAL2FCjA91pTB2fs6+2XWW8p0AouCSk7ZKBEGhFl4fHgkH2PzOdD YMTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xGbq/nBk"; 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 f3si1361430edw.598.2020.05.06.09.32.07; Wed, 06 May 2020 09:32:31 -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="xGbq/nBk"; 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 S1729789AbgEFQa3 (ORCPT + 99 others); Wed, 6 May 2020 12:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727984AbgEFQa2 (ORCPT ); Wed, 6 May 2020 12:30:28 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E060C061A10 for ; Wed, 6 May 2020 09:30:28 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id c12so1283265oic.1 for ; Wed, 06 May 2020 09:30: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=EvHPxE7L1Cb6oif98tDAWFYOvy9QzwI+EVnlaf1jpTo=; b=xGbq/nBkeNTeQkh8TeQ07h15oTGAYHX6j5LFfR/RI3sHIvBIymNOSSXRcu+wHZ1aVW Bi9WC0jgv9B5Kp+7cwBmKtfn1QjRyVdEkInImfKuIlVtWGUJmKfhJrI1QWyRGwCX0yJD ZWlgp81bR5ws/479qoQiUXdTQKezTywlxfTMxQqtDA8i2bG+9sntoecsCgJ9HLEPbqvg G34LbxJQDBp7Gtl0+VsmxjLGveZyAEy3fCO4pbX5afZwwEcYRPCDhYIDmwlFwhGzmFcG Lqdq+jCKkXA8vZnRXREVS+dR1h3wiY7f35aHnymxitA672W5CrNu0RAOCSEsoG6c/aHS oveg== 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=EvHPxE7L1Cb6oif98tDAWFYOvy9QzwI+EVnlaf1jpTo=; b=VISBvQ1SdsvjtVXOo/Gi2sjou6kifAM+08726iiNhF2pRwTPCyqjq8aq3sDB/c63sz KGvgnEVoYUqjPawo8Y0WpL0/uvQUvr795W88nrJeHFU+ew4UzlkzSpo57wynxjKln1sY fKwpjYZhbBOhe31SJzJ/GKHh2qG/6mlH8DwXSHNEbYEpVRmNcPJdL+PCl4w3Ic1cArxf lrgeXcNj9o8XnSDCv+icRwthPYizU8z2aeVhxpv2CO/1Uor6OH0kSjIfJYFVp0kmUynB TtibMqIhx8z5GiJRPv/KTCbv8nUkCblybReGt68mCfaGQV87AJxUCOXbH2LyNt2KJWMh k6+Q== X-Gm-Message-State: AGi0PubS1h8KyizS/Pl+Cq4qrjCxu8PRupJBP+QGNNSof1WvHlJYqoj2 SLlQpsv6P5/2mNYvIHViI+A62OFWZEn7ohq1X0JmVg== X-Received: by 2002:aca:cf83:: with SMTP id f125mr3336594oig.97.1588782627545; Wed, 06 May 2020 09:30: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> <20200504085007.5yrjhknkg6ugbqwk@DESKTOP-E1NTVVP.localdomain> <1bddb721-d4d9-f113-bacc-0a0ca2d57753@ti.com> In-Reply-To: <1bddb721-d4d9-f113-bacc-0a0ca2d57753@ti.com> From: John Stultz Date: Wed, 6 May 2020 09:30:16 -0700 Message-ID: Subject: Re: [RFC][PATCH 1/4] devicetree: bindings: Add linux,cma-heap tag for reserved memory To: "Andrew F. Davis" Cc: Brian Starkey , lkml , Rob Herring , Sumit Semwal , 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 Wed, May 6, 2020 at 9:04 AM Andrew F. Davis wrote: > On 5/4/20 4:50 AM, Brian Starkey wrote: > > On Fri, May 01, 2020 at 11:40:16AM -0700, John Stultz wrote: > >> 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. > >> > > > > Yeah I'm just wondering if that's "stable" so we can say "the heap > > will use the node name", or if saying that would cause us a headache > > in the future. > > > The issue is going to be this causes the node name in DT to become a > kind of ABI. Right now until we have some userspace lib that enumerates > the heaps in a stable way programs will hard-code the full heap name, > which right now would look like: > > char *heap = "/dev/dma_heap/dma_heap_mem@89000000"; > If that's what the device chose to export. > Yuk.. we might want to look into exporting heap properties to make them > searchable based on something other than name here soon. Or this will be > a mess to cleanup in the future. Eh. I don't see this as such an issue. On different systems we have different device nodes. Some boards have more or fewer NICs, or various partitions, etc. There has to be some device specific userland config that determines which partitions are mounted where (this is my "gralloc is fstab" thesis :) I think with the heaps, qualities other than name are going to be poorly specified or unenumerable, so any generic query interface is going to fall down there (and be awful to use). thanks -john