Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4713196imu; Tue, 8 Jan 2019 05:08:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN4nsWjAgelkdV4lmLUvxO3ENXc4ZDESrep/O1goeGOhsmYfhXv4KXAsKGlxZ0Hjyl0Cu3fV X-Received: by 2002:a17:902:be0e:: with SMTP id r14mr1632233pls.124.1546952925371; Tue, 08 Jan 2019 05:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546952925; cv=none; d=google.com; s=arc-20160816; b=Dz085p8KhHs2XtIOSFK6ZhqrB6+Gui1Eszkoq8YEIIp30yqnEIH7PTVDF2YSvyX7Tj YmTOyEYyU3776NhsC0QkbakRuZ1uitaVSLJQ1ekq/TuZry80YCrrVp06b7KFZX2ohvXe uCIK7cNOx2FcyC9X7REKSygxn7L7UIiikp1lbjopIwx9dCpCtEmtWw1lcwvjduHyPJ+M NYrLNPvHAlTqGxuRg48ACCqNN/x0nvtNwoswp1XCi0lTyNVVEFfqg+suROtu7dFt9yi7 hrWMJNG6ZRjwGTGBf1w2IdxO8My4OdKXq76O/UUJoOy5cS8St2PUE+k93suGxK7eRvAe zkRA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oDIyJ5FefG6R1fN38eBo9LpvUQ1jztrlRndw4KaE+es=; b=TdHg/q7MOLOIh9IjVrBwQEw4IFSB8XyOVc4M0aeKQ+f+nVwivje6lT2eGph2rLuBls Zh+NHtZGNwLNxwMMmn3YYUsSB/Lc0kYc8q/tvxbIxewQ4uXsp5V4kfQVqle2An+ACN8R NJ6uh5vLvcrC88zsYflgklOKOUyp+W5aABAJ93UL/Wo4lmlxaw9ekjQS6X8n6GW1x6Pm IYx5CF+RBASpoDgcJxjaWVY0NjKmRFfYPO9HzOotz3Dz+oRDNffPfl8/LuCjE+z3Xcwj Z+pOw/mZ/6IHLWDQR0f7Z8ZsaJlEiHsHVIjx/bxT9WqPYX3MITWLc7mwBA/c3vcJ66JL 08qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BOZVE+ER; 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 j13si24076014pgi.227.2019.01.08.05.08.29; Tue, 08 Jan 2019 05:08:45 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BOZVE+ER; 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 S1728396AbfAHNHK (ORCPT + 99 others); Tue, 8 Jan 2019 08:07:10 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36208 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727721AbfAHNHJ (ORCPT ); Tue, 8 Jan 2019 08:07:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oDIyJ5FefG6R1fN38eBo9LpvUQ1jztrlRndw4KaE+es=; b=BOZVE+ERASGKKtiuuCUBcJ59y j6XobSKAcBI30kR93gM1UoMSnDnFicQkXPX/1EfLE9TxpUaQvp+BuoqhuAF5PHYTJAVPx1beUIqy5 sq8N7iG3BERI44DweOX2nyi+xl3XURPObIKkPFTtQazE+WMQZPwALAmuluILX9QMp3AOahRBRQAII m2vGXmM1grsFSh1IYR7dphagzb0FjVIaotgMdyqdVs930d/JMJRM2ijepfSovv0CdcgTXLHYVCYMZ qAsgR1fI2B053+SbyUwDlIVOXPWN6rPhl/vg9YlKtE/828dRgOIYtDut1SmopDfYj19xNMA0DCUoJ q4Z+3zWMQ==; Received: from rrcs-24-103-175-221.nys.biz.rr.com ([24.103.175.221] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggr5z-0005bG-HT; Tue, 08 Jan 2019 13:07:03 +0000 From: Christoph Hellwig To: Linus Torvalds Cc: Luis Chamberlain , Julia Lawall , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: remove dma_zalloc_coherent Date: Tue, 8 Jan 2019 08:06:58 -0500 Message-Id: <20190108130701.14161-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)