Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp996965imu; Fri, 11 Jan 2019 12:59:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4jFrgsL599wRcDni6z2vZd/PJ8FaDKmOJ9e0gQQATwNyqOfBsMRHy18U5fyzLmVdSucUwL X-Received: by 2002:a17:902:a58a:: with SMTP id az10mr16441284plb.10.1547240364681; Fri, 11 Jan 2019 12:59:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547240364; cv=none; d=google.com; s=arc-20160816; b=CklVPAo9D+XM2cqH5/ITgeslovANZbxxHkixTCvmvWSugqNG9E1G2DhshtS2w+HFPl NsH/RofxVF0Hx/GySnJSm36DUvRUTORqIzussDctfxCma+EZncsDEAoGIqOAk5BVsBam XuK1f3mtZaDvlaFOx+VD4dauqs9R3ERDEUxGFegWuF180Bgm9wf5wbnmo+Wj00kaTFh7 n+qhKWvpaTn1E7q59jjJ7iVF2eV1dN2YGrKXN4SIuVDV0nvTwYKhuX31P5Gi14HU5AQW A+ghiB7miDM/ueRgJGAj69J2xn7cdXKwsMqtHamvvYBx/tqeGstgjqWC9xOIP1NNsmrL t9JQ== 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; bh=w118wQg9SA9gjRLK6raV0WbkvPP7onfm3bpLFOrkm4I=; b=zaCxgcPTEGPwO11YCEsVqFD9RHg8z/7BsOvWsqq55rAonZOmAblPeewRuBcpIxhNro 6G1aY6XHZqWPIiujmavY2qPBPA7gR39dQA+pnVXaRXFfXU53R+18ksh3Uy06M01A1bKZ cn8k+91S1UjP0ih2z6p19UxpN+IobSxOquK4pZVCRqKJZLxJ9eu1CFIThcMGyfj70on9 60AxxDz/UAY5OMeIJHK8+GdCLnlEKG3rOjjQl4oLhdqd9XvkO807aToTxLH1nb1KqhaH BzCoIZ0y7EBsShxvTc53zMHbepGKyAoPdCNgw2PSEO6F8SS0aIV2Bhd2Sdg9HwRMSblK bbGA== ARC-Authentication-Results: i=1; mx.google.com; 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 b70si6808742pfe.168.2019.01.11.12.59.09; Fri, 11 Jan 2019 12:59:24 -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; 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 S2389915AbfAKSQc (ORCPT + 99 others); Fri, 11 Jan 2019 13:16:32 -0500 Received: from verein.lst.de ([213.95.11.211]:57607 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbfAKSQc (ORCPT ); Fri, 11 Jan 2019 13:16:32 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id C272568DD2; Fri, 11 Jan 2019 19:16:30 +0100 (CET) Date: Fri, 11 Jan 2019 19:16:30 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Julia Lawall , Luis Chamberlain , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: remove dma_zalloc_coherent Message-ID: <20190111181630.GA21720@lst.de> References: <20190108130701.14161-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190108130701.14161-1-hch@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, any chance you could take this before -rc2? That should avoid a lot of churn going forward. Any fine tuning of the memset-removal cochinnelle scripts can be queued up with normal updates. On Tue, Jan 08, 2019 at 08:06:58AM -0500, Christoph Hellwig wrote: > Hi Linus and world, > > We've always had a weird situation around dma_zalloc_coherent. To > safely support mapping the allocations to userspace major architectures > like x86 and arm have always zeroed allocations from dma_alloc_coherent, > but a couple other architectures were missing that zeroing either always > or in corner cases. Then later we grew anothe dma_zalloc_coherent > interface to explicitly request zeroing, but that just added __GFP_ZERO > to the allocation flags, which for some allocators that didn't end > up using the page allocator ended up being a no-op and still not > zeroing the allocations. > > So for this merge window I fixed up all remaining architectures to zero > the memory in dma_alloc_coherent, and made dma_zalloc_coherent a no-op > wrapper around dma_alloc_coherent, which fixes all of the above issues. > > dma_zalloc_coherent is now pointless and can go away, and Luis helped > me writing a cocchinelle script and patch series to kill it, which I > think we should apply now just after -rc1 to finally settle these > issue. > > The script that generated the first patch is included here: > > @ replace_dma_zalloc_coherent @ > expression dev, size, data, handle, flags; > @@ > > -dma_zalloc_coherent(dev, size, handle, flags) > +dma_alloc_coherent(dev, size, handle, flags) > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu ---end quoted text---