From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50C7EC06510 for ; Tue, 2 Jul 2019 15:13:46 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 213142146F for ; Tue, 2 Jul 2019 15:13:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="PZuM9EJb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 213142146F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lists.linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8F15A1C69; Tue, 2 Jul 2019 15:13:45 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E6D3D17E8 for ; Tue, 2 Jul 2019 09:48:50 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8B971836 for ; Tue, 2 Jul 2019 09:48:49 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id p13so16983230wru.10 for ; Tue, 02 Jul 2019 02:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UdYCIZGQ7tAt7A88vWqWA422Qpx5IuQReKn9P3m3xX8=; b=PZuM9EJbQb3YhMp+qaw+VF6BwkhSSyYMquhljCcVZSO+tjIcy06ofVIGPbwYNmREXi pRcuGFWqgU+nSlEobDVIi97m26fD20LGHZVCL/m/+eGewb0yAO7NlvlF/9gBYN5Rgy0B UVcUnIeulg2Ui8pzjNF76wVB55J/p/3pN/YrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UdYCIZGQ7tAt7A88vWqWA422Qpx5IuQReKn9P3m3xX8=; b=hOBxWrs6dVeLLs+SqDzxEYBKzz2b1mjjbSW8y8BM2Nkbst9xPFsM0N+p8g3YM2ouND OzlMFq4jMOVNM+Ak23MtxiPPgoI5dL9cJ9n0DGcsUXcBGYb6SweOIqrDBIgAaZkSxWlH nUXxI6BOwUcLUSYH3WvhxHj6TCiCguXMKtEnc16OiFDi4tRdYAH1LQO6xOjnmBm2jKey Rn0ELdEk2MC+lJxfZ0v5zvIfKF2VUwKVzXA714ImFqCmij7gtQtJR6hXWmotNWQ2QeSM q37HPr5FeBdVWiwJ5zHnZFk3lXgtvN0qqXz7A2SBkXxtrPSqUVmOKOWkmQ7vuR+zjWKN qPuA== X-Gm-Message-State: APjAAAWEMc6WeuWDE5xmOFRFCONKF1A8ZOrWBGs7YH9crV/gU8cQhO2W 1YcVEk1FmjaZYnda8+vVcRzNXA== X-Google-Smtp-Source: APXvYqw+cs3wphtlInYiqa/iYYLL5YBkbuaWsrCFwdpkqDK8kfUrPvl8YI8TNOvUo+26MvPNs1E1Ng== X-Received: by 2002:adf:9487:: with SMTP id 7mr9588274wrr.114.1562060928176; Tue, 02 Jul 2019 02:48:48 -0700 (PDT) Received: from [10.176.68.244] ([192.19.248.250]) by smtp.gmail.com with ESMTPSA id l124sm2421987wmf.36.2019.07.02.02.48.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jul 2019 02:48:47 -0700 (PDT) Subject: Re: use exact allocation for dma coherent memory To: Christoph Hellwig , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Ian Abbott , H Hartley Sweeten References: <20190614134726.3827-1-hch@lst.de> <20190701084833.GA22927@lst.de> Message-ID: <74eb9d99-6aa6-d1ad-e66d-6cc9c496b2f3@broadcom.com> Date: Tue, 2 Jul 2019 11:48:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190701084833.GA22927@lst.de> Content-Language: en-US X-Mailman-Approved-At: Tue, 02 Jul 2019 15:11:13 +0000 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 X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Arend Van Spriel via iommu Reply-To: Arend Van Spriel Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu