Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3141019ybi; Tue, 2 Jul 2019 02:49:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyU+AEEtC8B3FlTzYeXAaJhriA7V/QlBmd2d7ztNI/Oe8zUV1HB4qshDPIK30LjUTI177OS X-Received: by 2002:a63:755e:: with SMTP id f30mr21505754pgn.246.1562060976126; Tue, 02 Jul 2019 02:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562060976; cv=none; d=google.com; s=arc-20160816; b=0L8jRUJDGLD5bDajdXHvX8yXaMrjXpq5u9rYfvO/9GiW+EvEEVfLdKdP5EyjYIjg8A 58f715g4NQKuNhE3F1VJD1bAuhvit9z3uFljd5K5GDdHU41gjXIRYSuvsFZbuztENh0p 1gABrrqd3GqXfoqqGTPJbWGqagpdTPcLgB8iSWktAhbO1mc4WaOD05HqZ+6SkTDDzHwg dDoVUFnJAe7C7CRZiHwTxA9waGQ1JjPo2nAU/vDBu61DA8gPhOb6m9zCVxuy1pv+EPAM 6PGQhyArg4FJyJr4HvAcpsMimBEjHKITPJbUwTbLvnhWIoohVoMqZdGuqbL/HNGq3uM/ X1hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=UdYCIZGQ7tAt7A88vWqWA422Qpx5IuQReKn9P3m3xX8=; b=KP/fHX3UcZKUb6JURpJK195bAZ/NaCsuquBbw0UuEzOg0p7C8JSQlaIgUbOeE4kANU XNrXwoMpGwgsOmcg7S5OSgVdnsEdKkPf8E+QC9YKRmvmnXU8zOBMnrQyqiXuY3DlwTo0 nOqsTholKlwgCoSBUheB1JqLPsAAI+RzH37x1b5cV4vdagBXtVX5VqnyeJEo9CmKGyvG +4HsBppt1cm1NEjiB4SJWSYbJ0+G/1ni7rRc6ipSjm2gGsrvtdUNORQp+NgRXqf+0WYX tdcXAkoH50IzRImdx0hzeDujFY6nydnvM3T4g3AX9wBmvJsevba6SIKVJEXoB2J1G2On OAvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=PZuM9EJb; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31si12490299pla.84.2019.07.02.02.49.21; Tue, 02 Jul 2019 02:49:36 -0700 (PDT) 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=pass header.i=@broadcom.com header.s=google header.b=PZuM9EJb; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727087AbfGBJsu (ORCPT + 99 others); Tue, 2 Jul 2019 05:48:50 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37537 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfGBJsu (ORCPT ); Tue, 2 Jul 2019 05:48:50 -0400 Received: by mail-wr1-f65.google.com with SMTP id v14so17011967wrr.4 for ; Tue, 02 Jul 2019 02:48:48 -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=R8kbjUbTUH0k/sQ12w0muayCkYEOTTCjrP6ZElSUCLsJpxZ2z5ZM7Fpha/Tk21GVyx hX0j2gEyGMQJsV5Ej0GMbaqJ3DKZoSjA/ogwkEVYAxowV/z3ac6vqpxvkhO5x2Hr3os7 tX9tP02WHLAKNrcjOsuzHRN4lbcPiWCrJpqcTHEAdfHt6PeJfO9GokIQy7SPJJX5/rxM rL0ERqz59FMrDMGlA4C+JnQ85kKdcDjfr0LB4WJlL+jjXn0B4kp1se4UNq8ujg5CuVQT cC8Jfmfs3fPKEPaWInfsBLqug9YB6qRNyS5O2d9PI59Np7HBszjJ+UQ/0o9Eg1rbs1NM /2dg== X-Gm-Message-State: APjAAAWHsA7fPg4vOdrVv0cMcZuo/pPlmKw9cSLYnoqQ7ZrxMCBtiys+ 7yxivxICk2zug9H2gwLPOXL8wA== 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 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 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 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-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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