Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1379238pxb; Fri, 6 Nov 2020 08:10:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/3ofCwHSa1jgTBzHGjsTnpxtLAJqEX3OefZlRueFWZGO0dR/3SzN88ElUiipX1Y+x2IkZ X-Received: by 2002:a17:907:4186:: with SMTP id mz6mr2869228ejb.175.1604679056312; Fri, 06 Nov 2020 08:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604679056; cv=none; d=google.com; s=arc-20160816; b=Mzvks/JgV/uqpnDPsm/I2rsrqUapUgEUGTowaHu6iWDtM0oMBi48lIpJJM897LOMVL HUpMYVPUio/MDTJXZ9blrW4RSu8fU1XP8AOFvo8ukF1TwG9ztKQD0pqkK69CpnoXgoG5 ibgJ9xoXsrsnpHQHTRKMpo0lClSHz9diaBSJOrRAjFaEhu8njOM3gZUn0iGRHbS4bngX teZXdYGB63jbpsSK57H29NjdRKYhfQqxn7/+UnJxnCFDFBdb2GQK4IHbL9GCTZz0TH0y 3fmEXJphxqRwgr7LlDRyL6OmbsS70hkOvbE7ed3aaG8OuIwUmW+0Qcaa88y7arklYB8x D/Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VDn6o8R5PjKTDwY2CQm75v62qlApv5NK+oiS2DCsbIs=; b=OovihofasQBOiNy7fSkFNKQ/Nb6qOtRL2NE1sbrVxTn291NR7Qj5Y908UXEBFqo15/ CG17awPzcQ1A6cvKv9FM53mPp8c+gULh8Flxr145MtwN85ukFSh/TzLep2J+aBxcMCpi k387aAM6dZ846DRck6/i25gwfsOcsLKqoGhOM4D/WkSDQcz8BQr1gVic0bDeZ1b4T8xj B4x1cicssaokCtaih/rimp6oI/T/nrQoJy5NP7flyEliq6lheoRER5g2h46FFTlRvD75 LjS8ci5oLEHNuK+dJ/7EYGXECVa4OzSFMoja71xTBhA8okt1extYtoqgtY9P6f1KVbKT ooRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si1167519ejb.719.2020.11.06.08.10.33; Fri, 06 Nov 2020 08:10:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726983AbgKFQHn (ORCPT + 99 others); Fri, 6 Nov 2020 11:07:43 -0500 Received: from verein.lst.de ([213.95.11.211]:52084 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbgKFQHn (ORCPT ); Fri, 6 Nov 2020 11:07:43 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 7B3C268B05; Fri, 6 Nov 2020 17:07:38 +0100 (CET) Date: Fri, 6 Nov 2020 17:07:37 +0100 From: Christoph Hellwig To: Maxime Ripard Cc: Daniel Vetter , David Airlie , Christoph Hellwig , Paul Kocialkowski , Yong Deng , linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , Robin Murphy , Hans Verkuil Subject: Re: [PATCH 0/7] sunxi: Remove the calls to dma_direct_set_offset Message-ID: <20201106160737.GA31913@lst.de> References: <20201106151411.321743-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201106151411.321743-1-maxime@cerno.tech> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, this looks good to me: Reviewed-by: Christoph Hellwig Can you include this patch at the end of your series to that it gets picked up with the other patches? --- From 5963f88d365367fe74d477b8420d34562d684406 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 6 Nov 2020 17:02:17 +0100 Subject: dma-mapping: remove the dma_direct_set_offset export Drop the dma_direct_set_offset export and move the declaration to dma-map-ops.h now that the Allwinner drivers have stopped calling it. Signed-off-by: Christoph Hellwig --- arch/arm/mach-keystone/keystone.c | 2 +- arch/arm/mach-omap1/usb.c | 2 +- arch/sh/drivers/pci/pcie-sh7786.c | 2 +- arch/x86/pci/sta2x11-fixup.c | 3 ++- include/linux/dma-map-ops.h | 3 +++ include/linux/dma-mapping.h | 7 ------- kernel/dma/direct.c | 1 - 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c index 09a65c2dfd7327..cd711bfc591f21 100644 --- a/arch/arm/mach-keystone/keystone.c +++ b/arch/arm/mach-keystone/keystone.c @@ -8,7 +8,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index ba8566204ea9f4..86d3b3c157af44 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index 4468289ab2cac7..4d499476c33ad6 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c index 5701d5ba3df4ba..7d25256918543f 100644 --- a/arch/x86/pci/sta2x11-fixup.c +++ b/arch/x86/pci/sta2x11-fixup.c @@ -11,7 +11,8 @@ #include #include #include -#include +#include +#include #include #define STA2X11_SWIOTLB_SIZE (4*1024*1024) diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h index a5f89fc4d6df16..03925e438ec3e5 100644 --- a/include/linux/dma-map-ops.h +++ b/include/linux/dma-map-ops.h @@ -226,6 +226,9 @@ struct page *dma_alloc_from_pool(struct device *dev, size_t size, bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t)); bool dma_free_from_pool(struct device *dev, void *start, size_t size); +int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, + dma_addr_t dma_start, u64 size); + #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H #include #elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 2aaed35b556df4..2e49996a8f391a 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -558,11 +558,4 @@ static inline int dma_mmap_wc(struct device *dev, #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) #endif -/* - * Legacy interface to set up the dma offset map. Drivers really should not - * actually use it, but we have a few legacy cases left. - */ -int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, - dma_addr_t dma_start, u64 size); - #endif /* _LINUX_DMA_MAPPING_H */ diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 06c111544f61d6..002268262c9ad8 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -547,4 +547,3 @@ int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, dev->dma_range_map = map; return 0; } -EXPORT_SYMBOL_GPL(dma_direct_set_offset); -- 2.28.0