Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5969878imu; Mon, 21 Jan 2019 00:33:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN4nINZ2dqB7/mkNcNVAaFDRmBihIa6YJrSqLkzMjSlb+YZjN5+WnZO0C43aIAEJxutdchSx X-Received: by 2002:a62:220d:: with SMTP id i13mr28808759pfi.162.1548059597442; Mon, 21 Jan 2019 00:33:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548059597; cv=none; d=google.com; s=arc-20160816; b=rO1hG0UeCk2smgW1NxnC0wfnTffpbYro4gMWb+edcpqpEAQLtdKgkihUddJcxv8lN4 7M0Ol/A5EDsBb91/DdG7nXmjUCb6t2jHxYduOTGD7JIR9CfC3jG6ZULQpejh1wFL0AIq Z1cLZq8Ljt+TC5/IVdf7nwZHTWHd0gEnv2p4l1G71HUwZo9sscJQCkd5buWiBID73BLK vOddaCYT5M50FPVQbaPSoDYMjqpj9De0cUimRumKGclkKoxEhVZbTWJj1e2cStKWWv97 C1H/+RARbsWwCkTa+vVsVDkg0iaaCu5RHvprmTvatCiGdv67MN5jwHv6GFJC2oZiPI0H 1bfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lUXa8TKYTWwiVoFEB59+4Xq3RtYVOyUJ2dCrT/YnWEE=; b=O6mUFDY3R/CIzDmuG9T+505NOcJCjJiYEsKmeFDjmwfz8SudcTu7MiY4JAaR9GZpHF iac85kt2Dubfsoh5RfmeWfuUW+7RZBD/0hA0BOuP+knJ1L2ovtyqrXR4Qmtyevyn0Fdk 7N9YCKl1744qOcu89NVJOUitHGhK5nlT2IBpeOEYYz2C5l645Cndgj7i//C+63q04bXq b8KRRqxlrYDNuiYiuaZTTnrSPytFdLlapr/6/jnD2QqkTWqYhHuOyMIFw7mhgyOvlIno ms/iNZqx4nPKipE6mT8tvlCQSQf7wQneZa1YaWHr1ef+dGt6XHLj+8cHxvPbzoeMJ+yo TirA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EIVbEhV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si598813plb.91.2019.01.21.00.33.01; Mon, 21 Jan 2019 00:33:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EIVbEhV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729442AbfAUIau (ORCPT + 99 others); Mon, 21 Jan 2019 03:30:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:46522 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728554AbfAUIat (ORCPT ); Mon, 21 Jan 2019 03:30:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lUXa8TKYTWwiVoFEB59+4Xq3RtYVOyUJ2dCrT/YnWEE=; b=EIVbEhV5K2cchUORGpp1F11H3 Dtqhj3aIhEqVJ6cr9fijkOEeo299enoqDL6tW2IYxiAUIHkguMlmx/I4+NMkGMIUvMSqNnDw6/ZBS FHHx/PgH6h/zNKwXiBxfXa8DBR5CvxcFxxYwSXG1wXnsYy4EJZwR3dXSwjlzsaqLjMMOco3XWmqIT /Gu8EaXH4SPxm94WAqW55Iuz5foX7JXE7A/fPEfOzVW6Ztr4+FbJPpLIZYj8GX6jY2GZkYQS/eZfR Hu25gXqBliZeU4aJ/WChsUyXNjWq94R/aj8w8uL5rCfxKByVt9NV2t0IBDsUaFJUXEVhfNFMCxN+s xmbaNnvYg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUyk-0005Pq-Os; Mon, 21 Jan 2019 08:30:46 +0000 Date: Mon, 21 Jan 2019 00:30:46 -0800 From: Christoph Hellwig To: Laura Abbott Cc: Christoph Hellwig , Liam Mark , sumit.semwal@linaro.org, arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, christian@brauner.io, devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, afd@ti.com, john.stultz@linaro.org Subject: Re: [PATCH 3/4] dma-buf: add support for mapping with dma mapping attributes Message-ID: <20190121083046.GD12420@infradead.org> References: <1547836667-13695-1-git-send-email-lmark@codeaurora.org> <1547836667-13695-4-git-send-email-lmark@codeaurora.org> <20190119102527.GA17723@infradead.org> <7ae73c39-9049-bcf6-775f-b0817ba0ec5f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ae73c39-9049-bcf6-775f-b0817ba0ec5f@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 19, 2019 at 08:50:41AM -0800, Laura Abbott wrote: > > And who is going to decide which ones to pass? And who documents > > which ones are safe? > > > > I'd much rather have explicit, well documented dma-buf flags that > > might get translated to the DMA API flags, which are not error checked, > > not very well documented and way to easy to get wrong. > > > > I'm not sure having flags in dma-buf really solves anything > given drivers can use the attributes directly with dma_map > anyway, which is what we're looking to do. The intention > is for the driver creating the dma_buf attachment to have > the knowledge of which flags to use. Well, there are very few flags that you can simply use for all calls of dma_map*. And given how badly these flags are defined I just don't want people to add more places where they indirectly use these flags, as it will be more than enough work to clean up the current mess. What flag(s) do you want to pass this way, btw? Maybe that is where the problem is.