From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:39856 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726455AbfGBJsu (ORCPT ); Tue, 2 Jul 2019 05:48:50 -0400 Received: by mail-wr1-f66.google.com with SMTP id x4so17009465wrt.6 for ; Tue, 02 Jul 2019 02:48:48 -0700 (PDT) Subject: Re: use exact allocation for dma coherent memory References: <20190614134726.3827-1-hch@lst.de> <20190701084833.GA22927@lst.de> From: Arend Van Spriel Message-ID: <74eb9d99-6aa6-d1ad-e66d-6cc9c496b2f3@broadcom.com> Date: Tue, 2 Jul 2019 11:48:44 +0200 MIME-Version: 1.0 In-Reply-To: <20190701084833.GA22927@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Christoph Hellwig , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Ian Abbott , H Hartley Sweeten Cc: devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, Intel Linux Wireless , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, "moderated list:ARM PORT" , linux-media@vger.kernel.org On 7/1/2019 10:48 AM, Christoph Hellwig wrote: > On Fri, Jun 14, 2019 at 03:47:10PM +0200, Christoph Hellwig wrote: >> Switching to a slightly cleaned up alloc_pages_exact is pretty easy, >> but it turns out that because we didn't filter valid gfp_t flags >> on the DMA allocator, a bunch of drivers were passing __GFP_COMP >> to it, which is rather bogus in too many ways to explain. Arm has >> been filtering it for a while, but this series instead tries to fix >> the drivers and warn when __GFP_COMP is passed, which makes it much >> larger than just adding the functionality. > > Dear driver maintainers, > > can you look over the patches touching your drivers, please? I'd > like to get as much as possible of the driver patches into this > merge window, so that it can you through your maintainer trees. You made me look ;-) Actually not touching my drivers so I'm off the hook. However, I was wondering if drivers could know so I decided to look into the DMA-API.txt documentation which currently states: """ The flag parameter (dma_alloc_coherent() only) allows the caller to specify the ``GFP_`` flags (see kmalloc()) for the allocation (the implementation may choose to ignore flags that affect the location of the returned memory, like GFP_DMA). """ I do expect you are going to change that description as well now that you are going to issue a warning on __GFP_COMP. Maybe include that in patch 15/16 where you introduce that warning. Regards, Arend