From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Date: Thu, 20 Apr 2017 10:49:32 +0100 Message-ID: <20170420094932.GM17774@n2100.armlinux.org.uk> References: <20170419182413.866327-1-arnd@arndb.de> <8df7c5a9-c71c-4ee9-9bc2-9c861cf9796c@kapsi.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Arnd Bergmann Cc: Mikko Perttunen , Linux Kernel Mailing List , dri-devel , Mikko Perttunen , Thierry Reding , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux ARM List-Id: linux-tegra@vger.kernel.org On Thu, Apr 20, 2017 at 10:25:01AM +0200, Arnd Bergmann wrote: > On Thu, Apr 20, 2017 at 9:02 AM, Mikko Perttunen wrote: > > I think we have a "policy" on Tegra that the DMA API will never allocate > > using the IOMMU (Thierry can elaborate on this), which is why I wrote the > > code with that assumption. Essentially, we have made the DMA API into the > > API that allocates CPU-visible memory. > > I don't think this can be a per-platform policy. > > > Considering that, I'm wondering if we can just have a temporary local > > dma_addr_t and then cast that to phys_addr_t, combined with a good comment? > > That was my first approach, and it does address the warning, but > I did not send it because it still felt too wrong. Sounds to me like the warning is justified - it's saying that there's something not right here which could be a problem. So I'd say, don't fix the warning, it's doing its job, highlighting a potential problem with the code. (Consider hiding the warning and then running on a platform where the assumptions are broken.) -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.